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.
This commit is contained in:
Joshua Goins
2025-02-21 20:14:53 -05:00
parent 537ce772af
commit 72416884d4

View File

@@ -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());
}