summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-03 16:56:24 (GMT)
committerSwift Review <review@swift.im>2014-10-06 10:13:43 (GMT)
commit9d9dc201b24109c8d7fd8f85553659888c1d7747 (patch)
tree2be3a8548384a0372f1093501d85f427309c1fb6 /Swift/Controllers
parentb09eaffed6a9b04477d51a2a4cbb428ce1149fc6 (diff)
downloadswift-9d9dc201b24109c8d7fd8f85553659888c1d7747.zip
swift-9d9dc201b24109c8d7fd8f85553659888c1d7747.tar.bz2
Fix own avatar in contact list header not updated on VCard edit.
Commit 14fd8e changed the JID comparison to JID::WithResource. However, we want JID::WithoutResource because a) handleAvatarChanged is called with a bare resource when our own avatar changes and b) we also want the avatar in the contact list header be updated if another of our resources changes it. Test-Information: Changed own avatar to a different avatar or cleared it. Before the avatar in the contact list header was not updated; now it is. Change-Id: Ie84b6cb10b528f75c1c76c7ceae558f00380d99f
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Roster/RosterController.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp
index 43623d5..05376c9 100644
--- a/Swift/Controllers/Roster/RosterController.cpp
+++ b/Swift/Controllers/Roster/RosterController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2013 Kevin Smith
+ * Copyright (c) 2010-2014 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -364,7 +364,7 @@ void RosterController::handleOwnVCardChanged(VCard::ref vcard) {
void RosterController::handleAvatarChanged(const JID& jid) {
boost::filesystem::path path = avatarManager_->getAvatarPath(jid);
roster_->applyOnItems(SetAvatar(jid, path));
- if (jid.equals(myJID_, JID::WithResource)) {
+ if (jid.equals(myJID_, JID::WithoutResource)) {
mainWindow_->setMyAvatarPath(pathToString(path));
ownContact_->setAvatarPath(pathToString(path));
mainWindow_->setMyContactRosterItem(ownContact_);