diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-22 22:36:11 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-22 22:36:11 +0100 |
commit | 2fdcb290c7c5249896e3f8b542df16e248487f34 (patch) | |
tree | cf3b437afb534f0ed41919b2dbe1a596a53d6ef1 | |
parent | 59ab0d5e04152e9657bdb47a6c9e860f4864be20 (diff) | |
download | libquotient-2fdcb290c7c5249896e3f8b542df16e248487f34.tar.gz libquotient-2fdcb290c7c5249896e3f8b542df16e248487f34.zip |
Fix stupid false-negatives from Room::updateStats()
-rw-r--r-- | lib/room.cpp | 4 |
1 files 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, |