Recycle chat pages if possible when switching room

The chat page is complex and slow to create, which creates a visible lag
when user switches room.

Instead of throwing the pre-switch one away and
making a new one from scratch, keep the same page and update its user &
room ID for a big improvement in responsiveness. The rest is automatic
thanks to QML property bindings.
This commit is contained in:
miruka
2020-09-02 14:42:40 -04:00
parent 509c4a0871
commit a4bbbfee87
5 changed files with 32 additions and 24 deletions

View File

@@ -574,6 +574,11 @@ Rectangle {
id: contextMenu
eventList: eventList
}
Connections {
target: chat
function onPageIdentityChanged() { eventList.moreToLoad = true }
}
}
Timer {