Skip to content
Snippets Groups Projects
Verified Commit d2c616ee authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix request for empty image

parent 05ba0c88
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,9 @@ AbstractButton {
fillMode: avatar.crop ? Image.PreserveAspectCrop : Image.PreserveAspectFit
mipmap: true
smooth: true
source: if (avatar.url.startsWith('image://')) {
source: if (avatar.url.startsWith('image://colorimage')) {
return avatar.url + "&radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale");
} else if (avatar.url.startsWith('image://')) {
return avatar.url + "?radius=" + (Settings.avatarCircles ? 100 : 25) + ((avatar.crop) ? "" : "&scale");
} else if (avatar.url.startsWith(':/')) {
return "image://colorimage/" + avatar.url + "?" + textColor;
......
......@@ -146,8 +146,10 @@ Page {
url: {
if (model.avatarUrl.startsWith("mxc://"))
return model.avatarUrl.replace("mxc://", "image://MxcImage/");
else
else if (model.avatarUrl.length > 0)
return "image://colorimage/" + model.avatarUrl + "?" + communityItem.unimportantText;
else
return "";
}
width: avatarSize
......
......@@ -41,7 +41,7 @@ Popup {
font.pixelSize: Math.ceil(quickSwitcher.textHeight * 0.6)
width: parent.width
Keys.onPressed: (event) => {
Keys.onPressed: event => {
if (event.key == Qt.Key_Up || event.key == Qt.Key_Backtab) {
event.accepted = true;
completerPopup.up();
......
......@@ -568,8 +568,8 @@ Page {
spacing: Nheko.paddingSmall
Item {
Layout.fillWidth: true
Layout.alignment: Qt.AlignBottom
Layout.fillWidth: true
ElidedLabel {
anchors.bottom: parent.bottom
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment