summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Avatars/VCardUpdateAvatarManager.cpp')
-rw-r--r--Swiften/Avatars/VCardUpdateAvatarManager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swiften/Avatars/VCardUpdateAvatarManager.cpp b/Swiften/Avatars/VCardUpdateAvatarManager.cpp
index b2b4635..879846e 100644
--- a/Swiften/Avatars/VCardUpdateAvatarManager.cpp
+++ b/Swiften/Avatars/VCardUpdateAvatarManager.cpp
@@ -90,7 +90,11 @@ JID VCardUpdateAvatarManager::getAvatarJID(const JID& jid) const {
void VCardUpdateAvatarManager::handleStanzaChannelAvailableChanged(bool available) {
if (available) {
- avatarHashes_.clear();
+ std::map<JID, String> oldAvatarHashes;
+ avatarHashes_.swap(oldAvatarHashes);
+ for(std::map<JID, String>::const_iterator i = oldAvatarHashes.begin(); i != oldAvatarHashes.end(); ++i) {
+ onAvatarChanged(i->first);
+ }
}
}