Add unread notification color for user mentioned

When user is mentioned (via matrix 'highlight_count'), inactive
rooms will use a different color for the notification circle than
when only general unread messages exist.
This commit is contained in:
redsky17 2019-01-25 02:43:54 +00:00
parent d70bc94f61
commit 4185b8d121
9 changed files with 33 additions and 13 deletions

View file

@ -546,7 +546,9 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
updateTypingUsers(room_id, room.second.ephemeral.typing);
updateRoomNotificationCount(
room_id, room.second.unread_notifications.notification_count);
room_id,
room.second.unread_notifications.notification_count,
room.second.unread_notifications.highlight_count);
if (room.second.unread_notifications.notification_count > 0)
hasNotifications = true;
@ -908,9 +910,11 @@ ChatPage::setGroupViewState(bool isEnabled)
}
void
ChatPage::updateRoomNotificationCount(const QString &room_id, uint16_t notification_count)
ChatPage::updateRoomNotificationCount(const QString &room_id,
uint16_t notification_count,
uint16_t highlight_count)
{
room_list_->updateUnreadMessageCount(room_id, notification_count);
room_list_->updateUnreadMessageCount(room_id, notification_count, highlight_count);
}
void