Fix avatar-loading

This commit is contained in:
Jaidyn Ann 2021-08-18 17:00:11 -05:00
parent 0637ee0401
commit b2e17f57dc
2 changed files with 2 additions and 4 deletions

View File

@ -434,12 +434,10 @@ Server::ImMessage(BMessage* msg)
break; break;
entry_ref ref; entry_ref ref;
if (msg->FindRef("ref", &ref) == B_OK) { if (msg->FindRef("ref", &ref) == B_OK) {
BBitmap* bitmap = BTranslationUtils::GetBitmap(&ref); BBitmap* bitmap = BTranslationUtils::GetBitmap(&ref);
user->SetNotifyAvatarBitmap(bitmap); user->SetNotifyAvatarBitmap(bitmap);
} else }
user->SetNotifyAvatarBitmap(NULL);
break; break;
} }
case IM_CREATE_CHAT: case IM_CREATE_CHAT:

View File

@ -190,7 +190,7 @@ User::SetNotifyAvatarBitmap(BBitmap* bitmap)
if ((fAvatarBitmap != bitmap) && (bitmap != NULL)) { if ((fAvatarBitmap != bitmap) && (bitmap != NULL)) {
fAvatarBitmap = bitmap; fAvatarBitmap = bitmap;
_SetCachedAvatar(bitmap); _SetCachedAvatar(bitmap);
NotifyPointer(PTR_AVATAR_BITMAP, (void*)bitmap); NotifyPointer(PTR_AVATAR_BITMAP, (void*)_GetCachedAvatar());
} }
} }