From 63fe083cad13838a42ac08ada3fa9f1286268022 Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 22 Oct 2020 20:30:23 -0400 Subject: [PATCH] Fix Alt+(Shift+)U/M ignoring local unread rooms The goTo{Previous,Next}{Unread,Mentioned}Room keybinds only took into accounts rooms that had a server-sent unread/highlight count, and not those that only had a client-side unread "!" badge (e.g. for rooms that get new messages but that have push rules disabling notifications). --- src/gui/MainPane/RoomList.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/MainPane/RoomList.qml b/src/gui/MainPane/RoomList.qml index edc4da01..b353525b 100644 --- a/src/gui/MainPane/RoomList.qml +++ b/src/gui/MainPane/RoomList.qml @@ -92,9 +92,10 @@ HListView { } function cycleUnreadRooms(forward=true, highlights=false) { - const prop = highlights ? "highlights" : "unreads" - const start = currentIndex === -1 ? 0 : currentIndex - let index = start + const prop = highlights ? "highlights" : "unreads" + const local_prop = highlights ? "local_highlights" : "local_unreads" + const start = currentIndex === -1 ? 0 : currentIndex + let index = start while (true) { index += forward ? 1 : -1 @@ -109,7 +110,7 @@ HListView { const item = model.get(index) - if (item.type === "Room" && item[prop]) { + if (item.type === "Room" && (item[prop] || item[local_prop])) { currentIndex = index return true }