Fix account page not being highlighted on startup

If the page loaded on app startup is account settings or add new chat,
ensure the room list properly highlights the corresponding account
delegate.
This commit is contained in:
miruka 2020-09-20 16:26:20 -04:00
parent db9fb6fda8
commit 35fa1fa16b

View File

@ -21,11 +21,15 @@ HListView {
readonly property bool currentShouldBeRoom:
window.uiState.page === "Pages/Chat/Chat.qml"
readonly property string wantedUserId:
(window.uiState.pageProperties.userRoomId || [])[0] || ""
readonly property string wantedUserId: (
window.uiState.pageProperties.userRoomId ||
[window.uiState.pageProperties.userId, ""]
)[0] || ""
readonly property string wantedRoomId:
(window.uiState.pageProperties.userRoomId || [])[1] || ""
readonly property string wantedRoomId: (
window.uiState.pageProperties.userRoomId ||
["", window.uiState.pageProperties.roomId]
)[1] || ""
readonly property var accountIndice: {
const accounts = {}