aboutsummaryrefslogtreecommitdiff
path: root/qml/ChatlistPage.qml
diff options
context:
space:
mode:
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)