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:
committed by
Kai Uwe Broulik
parent
6e8ed5b341
commit
9b763daf52
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user