From 2fdcb290c7c5249896e3f8b542df16e248487f34 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 22 Nov 2021 22:36:11 +0100 Subject: Fix stupid false-negatives from Room::updateStats() --- lib/room.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/room.cpp b/lib/room.cpp index e8d9b1bf..3090cb7b 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -736,7 +736,7 @@ Room::Changes Room::Private::updateStats(const rev_iter_t& from, qCDebug(MESSAGES).nospace() << "Recalculated partially read event statistics in " << q->objectName() << ": " << partiallyReadStats; - return Change::PartiallyReadStats | Change::UnreadStats; + return changes | Change::PartiallyReadStats; } } @@ -748,7 +748,7 @@ Room::Changes Room::Private::updateStats(const rev_iter_t& from, const auto newStats = EventStats::fromRange(q, from, to); Q_ASSERT(!newStats.isEstimate); - if (newStats.notableCount == 0 || newStats.highlightCount == 0) + if (newStats.empty()) return changes; const auto doAddStats = [this, &changes, newStats](EventStats& s, -- cgit v1.2.3