summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-08-20 14:28:10 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-08-20 14:28:10 (GMT)
commit7e78cc2b173db39f12e92a929ad17b706877e33d (patch)
treefdebc18a100fe1d16e174262297dbd7a4016abe9 /Swiften/Roster/Roster.cpp
parentb3de442223a5b3281c159b34f047d715da8ca3c9 (diff)
downloadswift-contrib-7e78cc2b173db39f12e92a929ad17b706877e33d.zip
swift-contrib-7e78cc2b173db39f12e92a929ad17b706877e33d.tar.bz2
Don't include status in MUC roster sorting.
Resolves: #536
Diffstat (limited to 'Swiften/Roster/Roster.cpp')
-rw-r--r--Swiften/Roster/Roster.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Roster/Roster.cpp b/Swiften/Roster/Roster.cpp
index e91b843..64a7241 100644
--- a/Swiften/Roster/Roster.cpp
+++ b/Swiften/Roster/Roster.cpp
@@ -21,9 +21,10 @@
namespace Swift {
-Roster::Roster(bool fullJIDMapping) {
+Roster::Roster(bool sortByStatus, bool fullJIDMapping) {
+ sortByStatus_ = sortByStatus;
fullJIDMapping_ = fullJIDMapping;
- root_ = new GroupRosterItem("Dummy-Root", NULL);
+ root_ = new GroupRosterItem("Dummy-Root", NULL, sortByStatus_);
root_->onChildrenChanged.connect(boost::bind(&Roster::handleChildrenChanged, this, root_));
}
@@ -52,7 +53,7 @@ GroupRosterItem* Roster::getGroup(const String& groupName) {
return group;
}
}
- GroupRosterItem* group = new GroupRosterItem(groupName, root_);
+ GroupRosterItem* group = new GroupRosterItem(groupName, root_, sortByStatus_);
root_->addChild(group);
group->onChildrenChanged.connect(boost::bind(&Roster::handleChildrenChanged, this, group));
group->onDataChanged.connect(boost::bind(&Roster::handleDataChanged, this, group));