From 9d9dc201b24109c8d7fd8f85553659888c1d7747 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Fri, 3 Oct 2014 18:56:24 +0200 Subject: 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 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_); -- cgit v0.10.2-6-g49f6