diff options
Diffstat (limited to 'qml/ChatlistPage.qml')
-rw-r--r-- | qml/ChatlistPage.qml | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/qml/ChatlistPage.qml b/qml/ChatlistPage.qml index dfc41f0..a6c3795 100644 --- a/qml/ChatlistPage.qml +++ b/qml/ChatlistPage.qml @@ -13,21 +13,20 @@ Kirigami.ScrollablePage { required property DcContext context required property DcAccountsEventEmitter eventEmitter - signal messagesChanged - onMessagesChanged: { - // Reload chatlist - updateChatlist(); - } + Connections { + target: chatlistPage.eventEmitter - signal messagesNoticed - onMessagesNoticed: { - // Reload chatlist - updateChatlist(); + function onMessagesChanged() { + // Reload chatlist + updateChatlist(); + } + function onMessagesNoticed() { + // Reload chatlist + updateChatlist(); + } } Component.onCompleted: { - eventEmitter.onMessagesChanged.connect(messagesChanged) - eventEmitter.onMessagesNoticed.connect(messagesNoticed) updateChatlist() } |