Set room as read when focusing it by ctrl+tab

This commit is contained in:
miruka 2020-05-14 14:29:41 -04:00
parent 008d4e6670
commit 4546a2f88c
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,5 @@
# TODO
- set open_room correctly when using other ways to change rooms than clicking
- merge AccountBar account and RoomList account delegates code
- fix python getting stuck when loading large room

View File

@ -50,6 +50,9 @@ HLoader {
if (history.length > historyLength) history.pop()
pageLoader.setSource(componentUrl, properties)
if (componentUrl === "Pages/Chat/Chat.qml" && properties.roomId)
py.callCoro("room_read", [properties.roomId])
}
function showPage(name, properties={}) {
@ -64,8 +67,6 @@ HLoader {
function showRoom(userId, roomId) {
_show("Pages/Chat/Chat.qml", {userId, roomId})
py.callCoro("room_read", [roomId])
window.uiState.page = "Pages/Chat/Chat.qml"
window.uiState.pageProperties = {userId, roomId}
window.uiStateChanged()