From dfc476b29e4c5955313eeb5e5ec5bef9c23c9239 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 26 Jul 2021 00:07:28 +0300 Subject: Show "NEW" badge for contact requests --- qml/ChatlistPage.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'qml/ChatlistPage.qml') diff --git a/qml/ChatlistPage.qml b/qml/ChatlistPage.qml index 7ba516a..8348091 100644 --- a/qml/ChatlistPage.qml +++ b/qml/ChatlistPage.qml @@ -95,7 +95,8 @@ Kirigami.ScrollablePage { username: (summary.text1 != "" ? summary.text1 + ": " : "") + summary.text2, avatarSource: profileImage ? "file:" + profileImage : "", chatName: chat.name, - freshMsgCnt: chatlistPage.context.getFreshMsgCnt(chatId) + freshMsgCnt: chatlistPage.context.getFreshMsgCnt(chatId), + isContactRequest: chat.isContactRequest } let j; @@ -207,8 +208,8 @@ Kirigami.ScrollablePage { } Label { - text: model.freshMsgCnt - visible: model.freshMsgCnt > 0 + text: model.isContactRequest ? "NEW" : model.freshMsgCnt + visible: model.freshMsgCnt > 0 || model.isContactRequest // Align label in the center of a badge. verticalAlignment: Text.AlignVCenter -- cgit v1.2.3-70-g09d2