From 673447241e20dff4bfe7ddb13805a5bd6e47a5ce Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 6 Jun 2021 17:29:27 +0300 Subject: Allow to open deaddrop chat, but do not mark it as seen or noticed --- qml/ChatlistPage.qml | 8 +++++--- qml/Message.qml | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'qml') diff --git a/qml/ChatlistPage.qml b/qml/ChatlistPage.qml index 5390baa..5da4d25 100644 --- a/qml/ChatlistPage.qml +++ b/qml/ChatlistPage.qml @@ -113,10 +113,12 @@ Kirigami.ScrollablePage { var chatId = chatlistModel.get(chatlist.currentIndex).chatId - if (chatId > 9) { - // > DC_CHAT_ID_LAST_SPECIAL + if (chatId == 1 || chatId > 9) { + // chatId == DC_CHAT_ID_DEADDROP || chatId > DC_CHAT_ID_LAST_SPECIAL - chatlistPage.context.marknoticedChat(chatId) + if (chatId != 1) { + chatlistPage.context.marknoticedChat(chatId) + } console.log("Selected chat " + chatId) diff --git a/qml/Message.qml b/qml/Message.qml index c3f5b62..21b3959 100644 --- a/qml/Message.qml +++ b/qml/Message.qml @@ -30,7 +30,11 @@ RowLayout { // Only try to mark fresh and noticed messages as seen to // avoid unnecessary database calls when viewing an already read chat. if ([10, 13].includes(messageObject.message.state)) { - messageObject.context.markseenMsgs([messageObject.message.id]) + // Do not mark DC_CHAT_ID_DEADDROP messages as seen to + // avoid contact request chat disappearing from chatlist. + if (messageObject.chatId != 1) { + messageObject.context.markseenMsgs([messageObject.message.id]) + } } } -- cgit v1.2.3-70-g09d2