mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Fix request for empty image
This commit is contained in:
parent
05ba0c8835
commit
d2c616ee67
4 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue