Refactor PageLoader show methods

Also lets the chat page recycling work with showPrevious() (ctrl+tab)
This commit is contained in:
miruka
2020-09-02 15:07:10 -04:00
parent a4bbbfee87
commit e947fe7695
8 changed files with 27 additions and 33 deletions

View File

@@ -20,7 +20,7 @@ HFlickableColumnPopup {
window.uiState.pageProperties.roomId === roomId)
{
window.mainUI.pageLoader.showPrevious() ||
window.mainUI.pageLoader.showPage("Default")
window.mainUI.pageLoader.showPage("Pages/Default.qml")
Qt.callLater(popup.destroy)
}

View File

@@ -38,7 +38,8 @@ HFlickableColumnPopup {
if (ModelStore.get("accounts").count < 2 ||
window.uiState.pageProperties.userId === userId)
{
window.mainUI.pageLoader.showPage("AddAccount/AddAccount")
const page = "Pages/AddAccount/AddAccount.qml"
window.mainUI.pageLoader.showPage(page)
}
py.callCoro("logout_client", [userId])