From 6dd33af0ca355d084373fdfbc56e9780a3b88917 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Sat, 2 Mar 2019 22:07:06 +0800 Subject: [PATCH] Fix a bug in notification. --- src/roomlistmodel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/roomlistmodel.cpp b/src/roomlistmodel.cpp index 2356402..7e9b133 100644 --- a/src/roomlistmodel.cpp +++ b/src/roomlistmodel.cpp @@ -77,6 +77,7 @@ void RoomListModel::connectRoomSignals(SpectralRoom* room) { connect(room, &Room::addedMessages, this, [=] { refresh(room, {LastEventRole}); }); connect(room, &Room::notificationCountChanged, this, [=] { + if (room->notificationCount() == 0) return; if (room->timelineSize() == 0) return; const RoomEvent* lastEvent = room->messageEvents().rbegin()->get(); if (lastEvent->isStateEvent()) return;