Fix communites sidebar color

This commit is contained in:
Nicolas Werner 2023-06-08 02:08:40 +02:00
parent 07731f0a2b
commit ca0340dd81
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 6 additions and 3 deletions

View file

@ -143,12 +143,14 @@ Page {
enabled: false
height: avatarSize
roomid: model.id
textColor: model.avatarUrl.startsWith(":/") ? communityItem.unimportantText : communityItem.importantText
url: {
if (model.avatarUrl.startsWith("mxc://"))
return model.avatarUrl.replace("mxc://", "image://MxcImage/");
else if (model.avatarUrl.length > 0)
return "image://colorimage/" + model.avatarUrl + "?" + communityItem.unimportantText;
else
else if (model.avatarUrl.length > 0) {
console.log("image://colorimage/" + model.avatarUrl + "?" + communityItem.unimportantText);
return model.avatarUrl;
} else
return "";
}
width: avatarSize

View file

@ -231,6 +231,7 @@ Menu {
height: sidebarAvatarSize
width: sidebarAvatarSize
url: modelData.url.replace("mxc://", "image://MxcImage/")
textColor: modelData.url.startsWith("mxc://") ? palette.text : palette.buttonText
displayName: modelData.name
roomid: modelData.name