Add a comment explaining room importance

This commit is contained in:
Emi Simpson 2020-03-13 20:59:20 -04:00
parent 0153dc7a39
commit 389117f1e8
No known key found for this signature in database
GPG Key ID: 68FAB2E2E6DFC98B
1 changed files with 5 additions and 0 deletions

View File

@ -327,6 +327,11 @@ RoomInfoListItem::updateUnreadMessageCount(int count, int highlightedCount)
unsigned short int
RoomInfoListItem::calculateImportance() const
{
// 0: All messages and minor events read
// 1: Contains unread minor events (joins/notices/muted messages)
// 2: Contains unread messages
// 3: Contains mentions
// 4: Is a room invite
return (hasUnreadMessages_) +
(unreadHighlightedMsgCount_ + unreadMsgCount_ != 0) +
(unreadHighlightedMsgCount_ != 0) +