From b2e17f57dc9ad609ee652454aead1f7456cdab0d Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Wed, 18 Aug 2021 17:00:11 -0500 Subject: [PATCH] Fix avatar-loading --- application/Server.cpp | 4 +--- application/User.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/application/Server.cpp b/application/Server.cpp index 82e1da0..9a83bba 100644 --- a/application/Server.cpp +++ b/application/Server.cpp @@ -434,12 +434,10 @@ Server::ImMessage(BMessage* msg) break; entry_ref ref; - if (msg->FindRef("ref", &ref) == B_OK) { BBitmap* bitmap = BTranslationUtils::GetBitmap(&ref); user->SetNotifyAvatarBitmap(bitmap); - } else - user->SetNotifyAvatarBitmap(NULL); + } break; } case IM_CREATE_CHAT: diff --git a/application/User.cpp b/application/User.cpp index 4fbd8b4..aa1785c 100644 --- a/application/User.cpp +++ b/application/User.cpp @@ -190,7 +190,7 @@ User::SetNotifyAvatarBitmap(BBitmap* bitmap) if ((fAvatarBitmap != bitmap) && (bitmap != NULL)) { fAvatarBitmap = bitmap; _SetCachedAvatar(bitmap); - NotifyPointer(PTR_AVATAR_BITMAP, (void*)bitmap); + NotifyPointer(PTR_AVATAR_BITMAP, (void*)_GetCachedAvatar()); } }