aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-08-01 19:23:41 +0300
committerlink2xt <link2xt@testrun.org>2021-08-01 19:23:41 +0300
commitef80085fab6d83a89a9a4309f2e7cdd272a812fe (patch)
tree111d76a214b57614ced4c1688901ce05e6770c5f /qml
parent9b2ce7538d28529f3c47e713779e4b0ae7b6aaf1 (diff)
downloadkdeltachat-ef80085fab6d83a89a9a4309f2e7cdd272a812fe.tar.gz
kdeltachat-ef80085fab6d83a89a9a4309f2e7cdd272a812fe.zip
Add "pinned" badge for pinned chats
Diffstat (limited to 'qml')
-rw-r--r--qml/ChatlistPage.qml18
1 files changed, 17 insertions, 1 deletions
diff --git a/qml/ChatlistPage.qml b/qml/ChatlistPage.qml
index a0d171a..03b18be 100644
--- a/qml/ChatlistPage.qml
+++ b/qml/ChatlistPage.qml
@@ -110,7 +110,8 @@ Kirigami.ScrollablePage {
avatarSource: profileImage ? "file:" + profileImage : "",
chatName: chat.name,
freshMsgCnt: chatlistPage.context.getFreshMsgCnt(chatId),
- isContactRequest: chat.isContactRequest
+ isContactRequest: chat.isContactRequest,
+ visibility: chat.visibility
}
let j;
@@ -221,6 +222,7 @@ Kirigami.ScrollablePage {
}
}
+
Label {
text: model.isContactRequest ? "NEW" : model.freshMsgCnt
visible: model.freshMsgCnt > 0 || model.isContactRequest
@@ -237,6 +239,20 @@ Kirigami.ScrollablePage {
radius: 0.25 * height
}
}
+
+ // "Pinned" badge
+ Rectangle {
+ visible: model.visibility == 2
+ color: Kirigami.Theme.alternateBackgroundColor
+ width: Kirigami.Units.gridUnit
+ height: Kirigami.Units.gridUnit
+ radius: 0.25 * height
+ Kirigami.Icon {
+ source: "pin"
+ height: Kirigami.Units.gridUnit
+ width: Kirigami.Units.gridUnit
+ }
+ }
}
}
}