From b4fe7ad5c1036b1d24470d9f8e0888faf582530a Mon Sep 17 00:00:00 2001 From: Richard Maudsley <richard.maudsley@isode.com> Date: Mon, 7 Jul 2014 14:50:32 +0100 Subject: Fix other user avatars appearing in roster tooltip. Test-Information: Reproduce bug by cycling MUC and confirm that another users avatar is visible in the tooltip. Apply this patch and check that only the users own avatar is displayed in the tooltip. Change-Id: I0e9ea44ce408ac445df9c089ce76556ae74e4394 diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp index 6bb5119..ecca9fe 100644 --- a/Swift/Controllers/Roster/RosterController.cpp +++ b/Swift/Controllers/Roster/RosterController.cpp @@ -352,9 +352,9 @@ void RosterController::handleAvatarChanged(const JID& jid) { roster_->applyOnItems(SetAvatar(jid, path)); if (jid.equals(myJID_, JID::WithResource)) { mainWindow_->setMyAvatarPath(pathToString(path)); + ownContact_->setAvatarPath(pathToString(path)); + mainWindow_->setMyContactRosterItem(ownContact_); } - ownContact_->setAvatarPath(pathToString(path)); - mainWindow_->setMyContactRosterItem(ownContact_); } void RosterController::handlePresenceChanged(Presence::ref presence) { -- cgit v0.10.2-6-g49f6