mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Place invites on top of room list even when sorting by importance is off
This commit is contained in:
parent
78ac902549
commit
d51cbe7e32
1 changed files with 7 additions and 8 deletions
|
@ -333,10 +333,9 @@ enum NotificationImportance : short
|
||||||
{
|
{
|
||||||
ImportanceDisabled = -1,
|
ImportanceDisabled = -1,
|
||||||
AllEventsRead = 0,
|
AllEventsRead = 0,
|
||||||
NewMinorEvents = 1, // This is currently unused
|
NewMessage = 1,
|
||||||
NewMessage = 2,
|
NewMentions = 2,
|
||||||
NewMentions = 3,
|
Invite = 3
|
||||||
Invite = 4
|
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned short int
|
unsigned short int
|
||||||
|
@ -344,11 +343,11 @@ RoomInfoListItem::calculateImportance() const
|
||||||
{
|
{
|
||||||
// Returns the degree of importance of the unread messages in the room.
|
// Returns the degree of importance of the unread messages in the room.
|
||||||
// If sorting by importance is disabled in settings, this only ever
|
// If sorting by importance is disabled in settings, this only ever
|
||||||
// returns ImportanceDisabled
|
// returns ImportanceDisabled or Invite
|
||||||
if (!settings->isSortByImportanceEnabled()) {
|
if (isInvite()) {
|
||||||
return ImportanceDisabled;
|
|
||||||
} else if (isInvite()) {
|
|
||||||
return Invite;
|
return Invite;
|
||||||
|
} else if (!settings->isSortByImportanceEnabled()) {
|
||||||
|
return ImportanceDisabled;
|
||||||
} else if (unreadHighlightedMsgCount_) {
|
} else if (unreadHighlightedMsgCount_) {
|
||||||
return NewMentions;
|
return NewMentions;
|
||||||
} else if (unreadMsgCount_) {
|
} else if (unreadMsgCount_) {
|
||||||
|
|
Loading…
Reference in a new issue