Rename PageLoader.showPage() → PageLoader.show()
This commit is contained in:
parent
90929691c6
commit
601b42a503
|
@ -110,7 +110,7 @@ HMenu {
|
|||
icon.name: "account-settings"
|
||||
text: qsTr("Account settings")
|
||||
onTriggered: {
|
||||
pageLoader.showPage(
|
||||
pageLoader.show(
|
||||
"Pages/AccountSettings/AccountSettings.qml",
|
||||
{ "userId": userId },
|
||||
)
|
||||
|
@ -122,7 +122,7 @@ HMenu {
|
|||
icon.name: "menu-add-chat"
|
||||
text: qsTr("Add new chat")
|
||||
onTriggered: {
|
||||
pageLoader.showPage("Pages/AddChat/AddChat.qml", {userId: userId})
|
||||
pageLoader.show("Pages/AddChat/AddChat.qml", {userId: userId})
|
||||
wentToAccountPage()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ HTile {
|
|||
backgroundColor: "transparent"
|
||||
toolTip.text: qsTr("Add new chat")
|
||||
onClicked: {
|
||||
pageLoader.showPage(
|
||||
pageLoader.show(
|
||||
"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("Pages/AddAccount/AddAccount.qml")
|
||||
pageLoader.show("Pages/AddAccount/AddAccount.qml")
|
||||
roomList.startCorrectItemSearch()
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ HListView {
|
|||
const item = model.get(index)
|
||||
|
||||
item.type === "Account" ?
|
||||
pageLoader.showPage(
|
||||
pageLoader.show(
|
||||
"Pages/AccountSettings/AccountSettings.qml", { "userId": item.id },
|
||||
) :
|
||||
pageLoader.showRoom(item.for_account, item.id)
|
||||
|
|
|
@ -18,7 +18,7 @@ HLoader {
|
|||
signal recycled()
|
||||
signal previousShown(string componentUrl, var properties)
|
||||
|
||||
function showPage(componentUrl, properties={}) {
|
||||
function show(componentUrl, properties={}) {
|
||||
history.unshift([componentUrl, properties])
|
||||
if (history.length > historyLength) history.pop()
|
||||
|
||||
|
@ -42,7 +42,7 @@ HLoader {
|
|||
}
|
||||
|
||||
function showRoom(userId, roomId) {
|
||||
showPage("Pages/Chat/Chat.qml", {userId, roomId})
|
||||
show("Pages/Chat/Chat.qml", {userId, roomId})
|
||||
}
|
||||
|
||||
function showPrevious(timesBack=1) {
|
||||
|
@ -50,7 +50,7 @@ HLoader {
|
|||
if (timesBack < 1) return false
|
||||
|
||||
const [componentUrl, properties] = history[timesBack]
|
||||
showPage(componentUrl, properties)
|
||||
show(componentUrl, properties)
|
||||
previousShown(componentUrl, properties)
|
||||
return true
|
||||
}
|
||||
|
@ -72,13 +72,11 @@ HLoader {
|
|||
|
||||
Component.onCompleted: {
|
||||
if (! py.startupAnyAccountsSaved) {
|
||||
pageLoader.showPage(
|
||||
"AddAccount/AddAccount", {"header.show": false},
|
||||
)
|
||||
pageLoader.show("AddAccount/AddAccount", {"header.show": false})
|
||||
return
|
||||
}
|
||||
|
||||
pageLoader.showPage(window.uiState.page, window.uiState.pageProperties)
|
||||
pageLoader.show(window.uiState.page, window.uiState.pageProperties)
|
||||
}
|
||||
|
||||
HNumberAnimation {
|
||||
|
|
|
@ -45,7 +45,7 @@ HFlickableColumnPage {
|
|||
[receivedUserId]
|
||||
)
|
||||
|
||||
pageLoader.showPage(
|
||||
pageLoader.show(
|
||||
"Pages/AccountSettings/AccountSettings.qml",
|
||||
{userId: receivedUserId},
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ HFlickableColumnPopup {
|
|||
window.uiState.pageProperties.roomId === roomId)
|
||||
{
|
||||
window.mainUI.pageLoader.showPrevious() ||
|
||||
window.mainUI.pageLoader.showPage("Pages/Default.qml")
|
||||
window.mainUI.pageLoader.show("Pages/Default.qml")
|
||||
|
||||
Qt.callLater(popup.destroy)
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ HFlickableColumnPopup {
|
|||
window.uiState.pageProperties.userId === userId)
|
||||
{
|
||||
const page = "Pages/AddAccount/AddAccount.qml"
|
||||
window.mainUI.pageLoader.showPage(page)
|
||||
window.mainUI.pageLoader.show(page)
|
||||
}
|
||||
|
||||
py.callCoro("logout_client", [userId])
|
||||
|
|
Loading…
Reference in New Issue
Block a user