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).
This commit is contained in:
parent
4c04c1158c
commit
63fe083cad
|
@ -93,6 +93,7 @@ HListView {
|
||||||
|
|
||||||
function cycleUnreadRooms(forward=true, highlights=false) {
|
function cycleUnreadRooms(forward=true, highlights=false) {
|
||||||
const prop = highlights ? "highlights" : "unreads"
|
const prop = highlights ? "highlights" : "unreads"
|
||||||
|
const local_prop = highlights ? "local_highlights" : "local_unreads"
|
||||||
const start = currentIndex === -1 ? 0 : currentIndex
|
const start = currentIndex === -1 ? 0 : currentIndex
|
||||||
let index = start
|
let index = start
|
||||||
|
|
||||||
|
@ -109,7 +110,7 @@ HListView {
|
||||||
|
|
||||||
const item = model.get(index)
|
const item = model.get(index)
|
||||||
|
|
||||||
if (item.type === "Room" && item[prop]) {
|
if (item.type === "Room" && (item[prop] || item[local_prop])) {
|
||||||
currentIndex = index
|
currentIndex = index
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user