From 1e07bc605fa69c533f1f4e0790b3870447da8e17 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 22 Feb 2021 13:50:47 +0300 Subject: chatlist: display number of fresh messages --- qml/ChatlistPage.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qml/ChatlistPage.qml b/qml/ChatlistPage.qml index 911ab48..d998688 100644 --- a/qml/ChatlistPage.qml +++ b/qml/ChatlistPage.qml @@ -45,7 +45,8 @@ Kirigami.Page { msgId: chatlist.getMsgId(i), username: (summary.text1 != "" ? summary.text1 + ": " : "") + summary.text2, avatarSource: profileImage ? "file:" + profileImage : "", - chatName: chat.name + chatName: chat.name, + freshMsgCnt: chatlistPage.context.getFreshMsgCnt(chatId) } let j; @@ -110,6 +111,11 @@ Kirigami.Page { name: model.chatName implicitWidth: height } + + trailing: Label { + text: model.freshMsgCnt + visible: model.freshMsgCnt > 0 + } } ScrollBar.vertical: ScrollBar {} -- cgit v1.2.3-70-g09d2