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
@@ -86,7 +86,7 @@ Kirigami.ScrollablePage {
|
||||
Layout.preferredWidth: height
|
||||
Layout.fillHeight: true
|
||||
|
||||
source: avatar ? "image://mxc/" + avatar : ""
|
||||
source: avatar ? ("image://mxc/" + avatar) : ""
|
||||
name: name
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ Kirigami.ScrollablePage {
|
||||
Layout.preferredWidth: Kirigami.Units.iconSizes.huge
|
||||
Layout.preferredHeight: Kirigami.Units.iconSizes.huge
|
||||
|
||||
source: model.avatar ? "image://mxc/" + model.avatar : ""
|
||||
source: model.avatar ? ("image://mxc/" + model.avatar) : ""
|
||||
name: name
|
||||
}
|
||||
ColumnLayout {
|
||||
|
||||
@@ -134,7 +134,7 @@ Kirigami.ScrollablePage {
|
||||
Layout.minimumWidth: size
|
||||
Layout.maximumWidth: size
|
||||
|
||||
source: avatar ? "image://mxc/" + avatar : ""
|
||||
source: avatar ? ("image://mxc/" + avatar) : ""
|
||||
name: model.name || i18n("No Name")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user