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:
@@ -190,13 +190,15 @@ void NeoChatRoom::setVisible(bool visible)
|
|||||||
|
|
||||||
int NeoChatRoom::contextAwareNotificationCount() const
|
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) {
|
if (isSpace() || joinState() != JoinState::Join || successor(JoinState::Join) != nullptr) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (m_currentPushNotificationState == PushNotificationState::Mute) {
|
if (m_currentPushNotificationState == PushNotificationState::Mute) {
|
||||||
return 0;
|
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()) {
|
if (m_currentPushNotificationState == PushNotificationState::MentionKeyword || isLowPriority()) {
|
||||||
return int(highlightCount());
|
return int(highlightCount());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user