Refactor PageLoader show methods
Also lets the chat page recycling work with showPrevious() (ctrl+tab)
This commit is contained in:
@@ -111,7 +111,8 @@ HMenu {
|
||||
text: qsTr("Account settings")
|
||||
onTriggered: {
|
||||
pageLoader.showPage(
|
||||
"AccountSettings/AccountSettings", { "userId": userId },
|
||||
"Pages/AccountSettings/AccountSettings.qml",
|
||||
{ "userId": userId },
|
||||
)
|
||||
wentToAccountPage()
|
||||
}
|
||||
@@ -121,7 +122,7 @@ HMenu {
|
||||
icon.name: "menu-add-chat"
|
||||
text: qsTr("Add new chat")
|
||||
onTriggered: {
|
||||
pageLoader.showPage("AddChat/AddChat", {userId: userId})
|
||||
pageLoader.showPage("Pages/AddChat/AddChat.qml", {userId: userId})
|
||||
wentToAccountPage()
|
||||
}
|
||||
}
|
||||
|
@@ -146,7 +146,9 @@ HTile {
|
||||
backgroundColor: "transparent"
|
||||
toolTip.text: qsTr("Add new chat")
|
||||
onClicked: {
|
||||
pageLoader.showPage("AddChat/AddChat", {userId: model.id})
|
||||
pageLoader.showPage(
|
||||
"Pages/AddChat/AddChat.qml", {userId: model.id},
|
||||
)
|
||||
account.wentToAccountPage()
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ Rectangle {
|
||||
toolTip.text: qsTr("Add another account")
|
||||
backgroundColor: theme.mainPane.bottomBar.settingsButtonBackground
|
||||
onClicked: {
|
||||
pageLoader.showPage("AddAccount/AddAccount")
|
||||
pageLoader.showPage("Pages/AddAccount/AddAccount.qml")
|
||||
roomList.startCorrectItemSearch()
|
||||
}
|
||||
|
||||
|
@@ -62,7 +62,7 @@ HListView {
|
||||
|
||||
item.type === "Account" ?
|
||||
pageLoader.showPage(
|
||||
"AccountSettings/AccountSettings", { "userId": item.id }
|
||||
"Pages/AccountSettings/AccountSettings.qml", { "userId": item.id },
|
||||
) :
|
||||
pageLoader.showRoom(item.for_account, item.id)
|
||||
|
||||
|
Reference in New Issue
Block a user