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 enabled: false
height: avatarSize height: avatarSize
roomid: model.id roomid: model.id
textColor: model.avatarUrl.startsWith(":/") ? communityItem.unimportantText : communityItem.importantText
url: { url: {
if (model.avatarUrl.startsWith("mxc://")) if (model.avatarUrl.startsWith("mxc://"))
return model.avatarUrl.replace("mxc://", "image://MxcImage/"); return model.avatarUrl.replace("mxc://", "image://MxcImage/");
else if (model.avatarUrl.length > 0) else if (model.avatarUrl.length > 0) {
return "image://colorimage/" + model.avatarUrl + "?" + communityItem.unimportantText; console.log("image://colorimage/" + model.avatarUrl + "?" + communityItem.unimportantText);
else return model.avatarUrl;
} else
return ""; return "";
} }
width: avatarSize width: avatarSize

View file

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