aboutsummaryrefslogtreecommitdiff
path: root/qml/ChatlistPage.qml
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-02-23 17:35:08 +0300
committerlink2xt <link2xt@testrun.org>2021-02-23 17:35:08 +0300
commit02fa66112ff228926bd55aaf7630dfd73c298109 (patch)
tree7dc900ab3014ca83b6b9de05df7c6652659cedaf /qml/ChatlistPage.qml
parent5cc6dd5005e8f630cc80b7b3c51cf302bb08e9a0 (diff)
downloadkdeltachat-02fa66112ff228926bd55aaf7630dfd73c298109.tar.gz
kdeltachat-02fa66112ff228926bd55aaf7630dfd73c298109.zip
Mark chat as noticed when selected
Diffstat (limited to 'qml/ChatlistPage.qml')
-rw-r--r--qml/ChatlistPage.qml8
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)