From c26753dc9785377da0d836ce6f4286af6e3b8790 Mon Sep 17 00:00:00 2001 From: Kevin Smith <git@kismith.co.uk> Date: Sat, 30 Apr 2011 10:15:23 +0100 Subject: This should fix the MUC ordering. Hopefully Resolves: #794 diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp index 0604dee..19489d3 100644 --- a/Swift/Controllers/Chat/MUCController.cpp +++ b/Swift/Controllers/Chat/MUCController.cpp @@ -209,10 +209,7 @@ void MUCController::handleOccupantJoined(const MUCOccupant& occupant) { appendToJoinParts(joinParts_, event); std::string groupName(roleToGroupName(occupant.getRole())); roster_->addContact(jid, realJID, occupant.getNick(), groupName, avatarManager_->getAvatarPath(jid).string()); - if (addedRosterGroups_.count(groupName) == 0) { - roster_->getGroup(groupName)->setManualSort(roleToSortName(occupant.getRole())); - addedRosterGroups_.insert(groupName); - } + roster_->getGroup(groupName)->setManualSort(roleToSortName(occupant.getRole())); if (joined_) { std::string joinString; MUCOccupant::Role role = occupant.getRole(); diff --git a/Swift/Controllers/Chat/MUCController.h b/Swift/Controllers/Chat/MUCController.h index e876791..6b05a8e 100644 --- a/Swift/Controllers/Chat/MUCController.h +++ b/Swift/Controllers/Chat/MUCController.h @@ -9,8 +9,8 @@ #include <boost/shared_ptr.hpp> #include <Swiften/Base/boost_bsignals.h> #include <boost/signals/connection.hpp> -#include <set> +#include <set> #include <string> #include <Swiften/Network/Timer.h> #include <Swift/Controllers/Chat/ChatControllerBase.h> @@ -98,7 +98,6 @@ namespace Swift { std::set<std::string> currentOccupants_; std::vector<NickJoinPart> joinParts_; boost::posix_time::ptime lastActivity_; - std::set<std::string> addedRosterGroups_; }; } -- cgit v0.10.2-6-g49f6