diff options
Diffstat (limited to 'Swift/Controllers/RosterController.cpp')
| -rw-r--r-- | Swift/Controllers/RosterController.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/Controllers/RosterController.cpp b/Swift/Controllers/RosterController.cpp index 063d2a7..807fc19 100644 --- a/Swift/Controllers/RosterController.cpp +++ b/Swift/Controllers/RosterController.cpp @@ -92,65 +92,65 @@ void RosterController::handleUserAction(boost::shared_ptr<UserRosterAction> acti onStartChatRequest(contactItem->getJID().toBare()); } } void RosterController::handleOnJIDAdded(const JID& jid) { std::vector<String> groups = xmppRoster_->getGroupsForJID(jid); String name = xmppRoster_->getNameForJID(jid); if (!groups.empty()) { foreach(const String& group, groups) { roster_->addContact(jid, name, group); } } else { roster_->addContact(jid, name, "Contacts"); } } void RosterController::handleOnJIDRemoved(const JID& jid) { roster_->removeContact(jid); } void RosterController::handleOnJIDUpdated(const JID& jid, const String& oldName, const std::vector<String> oldGroups) { if (oldName != xmppRoster_->getNameForJID(jid)) { handleOnJIDAdded(jid); return; } std::vector<String> groups = xmppRoster_->getGroupsForJID(jid); String name = xmppRoster_->getNameForJID(jid); String contactsGroup = "Contacts"; if (groups.empty()) { groups.push_back(contactsGroup); } foreach(const String& group, groups) { if (std::find(oldGroups.begin(), oldGroups.end(), jid) == oldGroups.end()) { roster_->addContact(jid, xmppRoster_->getNameForJID(jid), group); } } foreach(const String& group, oldGroups) { if (std::find(groups.begin(), groups.end(), group) == groups.end()) { roster_->removeContactFromGroup(jid, group); } } } void RosterController::handleIncomingPresence(boost::shared_ptr<Presence> presence) { roster_->applyOnItems(SetPresence(presence)); } -void RosterController::handleAvatarChanged(const JID& jid, const String& hash) { +void RosterController::handleAvatarChanged(const JID& jid, const String&) { String path = avatarManager_->getAvatarPath(jid).string(); roster_->applyOnItems(SetAvatar(jid, path)); if (jid.equals(myJID_, JID::WithoutResource)) { mainWindow_->setMyAvatarPath(path); } } void RosterController::handleStartChatRequest(const JID& contact) { onStartChatRequest(contact); } void RosterController::handleJoinMUCRequest(const JID &muc, const String &nick) { onJoinMUCRequest(JID(muc), nick); } } |
Swift