Fix a bug in notification.
This commit is contained in:
@@ -77,6 +77,7 @@ void RoomListModel::connectRoomSignals(SpectralRoom* room) {
|
|||||||
connect(room, &Room::addedMessages, this,
|
connect(room, &Room::addedMessages, this,
|
||||||
[=] { refresh(room, {LastEventRole}); });
|
[=] { refresh(room, {LastEventRole}); });
|
||||||
connect(room, &Room::notificationCountChanged, this, [=] {
|
connect(room, &Room::notificationCountChanged, this, [=] {
|
||||||
|
if (room->notificationCount() == 0) return;
|
||||||
if (room->timelineSize() == 0) return;
|
if (room->timelineSize() == 0) return;
|
||||||
const RoomEvent* lastEvent = room->messageEvents().rbegin()->get();
|
const RoomEvent* lastEvent = room->messageEvents().rbegin()->get();
|
||||||
if (lastEvent->isStateEvent()) return;
|
if (lastEvent->isStateEvent()) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user