Don't load empty images from imageprovider
Previously, when there was no avatar set, the source property of Avatar was still set to 'image://mxc/',
which caused Avatar to load that from the imageprovider. The imageprovider can't provide an empty image and aborts with error
(cherry picked from commit 724f10a895)
This commit is contained in:
committed by
Carl Schwan
parent
e87ae48f17
commit
893bc79f1e
@@ -111,7 +111,7 @@ Kirigami.OverlayDrawer {
|
||||
Layout.preferredHeight: Kirigami.Units.gridUnit * 3.5
|
||||
|
||||
name: room ? room.displayName : i18n("No name")
|
||||
source: room ? "image://mxc/" + room.avatarMediaId : undefined
|
||||
source: room ? ("image://mxc/" + room.avatarMediaId) : ""
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
@@ -190,7 +190,7 @@ Kirigami.OverlayDrawer {
|
||||
Layout.preferredWidth: height
|
||||
Layout.fillHeight: true
|
||||
|
||||
source: "image://mxc/" + avatar
|
||||
source: avatar ? ("image://mxc/" + avatar) : ""
|
||||
name: name
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user