From a3472e795cb84a121383bd6b4a831c297c3b0684 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Wed, 18 Jul 2018 22:52:48 +0800 Subject: [PATCH] Prepare for desktop notification. --- src/roomlistmodel.cpp | 2 ++ src/roomlistmodel.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/roomlistmodel.cpp b/src/roomlistmodel.cpp index 29134ad..6dbbe51 100644 --- a/src/roomlistmodel.cpp +++ b/src/roomlistmodel.cpp @@ -54,6 +54,8 @@ void RoomListModel::connectRoomSignals(QMatrixClient::Room* room) { [=] { unreadMessagesChanged(room); }); connect(room, &QMatrixClient::Room::notificationCountChanged, this, [=] { unreadMessagesChanged(room); }); +// connect(room, &QMatrixClient::Room::unreadMessagesChanged, this, +// &RoomListModel::highlightCountChanged); connect(room, &QMatrixClient::Room::joinStateChanged, this, [=] { refresh(room); }); connect(room, &QMatrixClient::Room::avatarChanged, this, diff --git a/src/roomlistmodel.h b/src/roomlistmodel.h index 4d87348..2667450 100644 --- a/src/roomlistmodel.h +++ b/src/roomlistmodel.h @@ -51,6 +51,7 @@ class RoomListModel : public QAbstractListModel { signals: void connectionChanged(); + void highlightCountChanged(QMatrixClient::Room* room); }; #endif // ROOMLISTMODEL_H