diff options
author | link2xt <link2xt@testrun.org> | 2021-02-23 17:35:08 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-02-23 17:35:08 +0300 |
commit | 02fa66112ff228926bd55aaf7630dfd73c298109 (patch) | |
tree | 7dc900ab3014ca83b6b9de05df7c6652659cedaf /qml/ChatlistPage.qml | |
parent | 5cc6dd5005e8f630cc80b7b3c51cf302bb08e9a0 (diff) | |
download | kdeltachat-02fa66112ff228926bd55aaf7630dfd73c298109.tar.gz kdeltachat-02fa66112ff228926bd55aaf7630dfd73c298109.zip |
Mark chat as noticed when selected
Diffstat (limited to 'qml/ChatlistPage.qml')
-rw-r--r-- | qml/ChatlistPage.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qml/ChatlistPage.qml b/qml/ChatlistPage.qml index 2e1d7fe..5d108c8 100644 --- a/qml/ChatlistPage.qml +++ b/qml/ChatlistPage.qml @@ -18,8 +18,15 @@ Kirigami.Page { updateChatlist(); } + signal messagesNoticed + onMessagesNoticed: { + // Reload chatlist + updateChatlist(); + } + Component.onCompleted: { eventEmitter.onMessagesChanged.connect(messagesChanged) + eventEmitter.onMessagesNoticed.connect(messagesNoticed) updateChatlist() } @@ -81,6 +88,7 @@ Kirigami.Page { onCurrentItemChanged: { var chatId = chatlistModel.get(currentIndex).chatId + chatlistPage.context.marknoticedChat(chatId) console.log("Current index is " + currentIndex) console.log("Selected chat " + chatId) |