From 4185b8d1217d7e298256d9bc1bee6188f5ab208d Mon Sep 17 00:00:00 2001 From: redsky17 Date: Fri, 25 Jan 2019 02:43:54 +0000 Subject: 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. --- src/ChatPage.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/ChatPage.cpp') diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index a60c09cb..72c667ce 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -546,7 +546,9 @@ ChatPage::ChatPage(QSharedPointer 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 -- cgit 1.5.1 From 933fd22e49bfa77549e3a45917c5197f5ecbdba9 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sat, 15 Dec 2018 23:20:11 +0100 Subject: escape id when joining a room --- src/ChatPage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ChatPage.cpp') diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index a60c09cb..aaaddf6d 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -1098,7 +1098,8 @@ ChatPage::trySync() void ChatPage::joinRoom(const QString &room) { - const auto room_id = room.toStdString(); + // Percent escape the room ID + const auto room_id = QUrl::toPercentEncoding(room).toStdString(); http::client()->join_room( room_id, [this, room_id](const nlohmann::json &, mtx::http::RequestErr err) { -- cgit 1.5.1