notificationsmanager: Don't draw room avatar if it is null

Ideally, we painted the avatar with initials here but for now
it's better to not paint anything than an awkward white circle.
This commit is contained in:
Kai Uwe Broulik
2025-08-12 07:55:01 +02:00
committed by Kai Uwe Broulik
parent 6e8ed5b341
commit 9b763daf52

View File

@@ -433,7 +433,7 @@ QPixmap NotificationsManager::createNotificationImage(const QImage &icon, NeoCha
if (room != nullptr) {
const QImage roomAvatar = room->avatar(imageRect.width(), imageRect.height());
if (icon != roomAvatar) {
if (!roomAvatar.isNull() && icon != roomAvatar) {
const QRect lowerQuarter{imageRect.center(), imageRect.size() / 2};
painter.setBrush(Qt::white);