From 72416884d463dceacb829631a7e563897202e718 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 21 Feb 2025 20:14:53 -0500 Subject: [PATCH] Add comment about push rule check in contextAwareNotificationCount() I thought this was unnecessary as the push rules should take care of it for us, but that's not entirely true. I added a comment to reflect this reality. --- src/libneochat/neochatroom.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libneochat/neochatroom.cpp b/src/libneochat/neochatroom.cpp index 1a788ebfd..4c383fe30 100644 --- a/src/libneochat/neochatroom.cpp +++ b/src/libneochat/neochatroom.cpp @@ -190,13 +190,15 @@ void NeoChatRoom::setVisible(bool visible) int NeoChatRoom::contextAwareNotificationCount() const { - // DOn't include spaces, rooms that the user hasn't joined and rooms where the user has joined the successor. + // Don't include spaces, rooms that the user hasn't joined and rooms where the user has joined the successor. if (isSpace() || joinState() != JoinState::Join || successor(JoinState::Join) != nullptr) { return 0; } if (m_currentPushNotificationState == PushNotificationState::Mute) { return 0; } + // There is (currently) no association between our highlight count and the associated push rule, + // so we need this check here otherwise everything appears out-of-sync. if (m_currentPushNotificationState == PushNotificationState::MentionKeyword || isLowPriority()) { return int(highlightCount()); }