summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEmi Simpson <emi@alchemi.dev>2020-03-13 20:59:20 -0400
committerEmi Simpson <emi@alchemi.dev>2020-03-13 20:59:20 -0400
commit389117f1e865275f93c5a99524719fc18911e27e (patch)
treec0dfe9dc4262a331aace92471fa5ce72bd8a2603 /src
parentAutomatically move rooms down in the list once they've been read (diff)
downloadnheko-389117f1e865275f93c5a99524719fc18911e27e.tar.xz
Add a comment explaining room importance
Diffstat (limited to 'src')
-rw-r--r--src/RoomInfoListItem.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp

index 8e4ccbb9..1860881a 100644 --- a/src/RoomInfoListItem.cpp +++ b/src/RoomInfoListItem.cpp
@@ -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) +