diff options
Diffstat (limited to 'Swiften/Roster/Roster.cpp')
-rw-r--r-- | Swiften/Roster/Roster.cpp | 7 |
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)); |