mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 20:18:53 +03:00
Fix communites sidebar color
This commit is contained in:
parent
07731f0a2b
commit
ca0340dd81
2 changed files with 6 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue