diff --git a/ui/qml/components/platform.kirigami/DialogPL.qml b/ui/qml/components/platform.kirigami/DialogPL.qml index 8a2c2803..08ff286b 100644 --- a/ui/qml/components/platform.kirigami/DialogPL.qml +++ b/ui/qml/components/platform.kirigami/DialogPL.qml @@ -38,9 +38,9 @@ PagePL { if (acceptDestinationPop) app.pages.pop(acceptDestination); else - app.push(acceptDestination); - } //else - //app.pages.pop(); + app.pages.push(acceptDestination); + } else + app.pages.pop(); } function accept() { diff --git a/ui/qml/components/platform.qtcontrols/DialogPL.qml b/ui/qml/components/platform.qtcontrols/DialogPL.qml index 19d506d7..f283da9d 100644 --- a/ui/qml/components/platform.qtcontrols/DialogPL.qml +++ b/ui/qml/components/platform.qtcontrols/DialogPL.qml @@ -41,7 +41,7 @@ PagePL { if (acceptDestinationPop) app.pages.pop(acceptDestination); else - app.push(acceptDestination); + app.pages.push(acceptDestination); } else app.pages.pop(); } diff --git a/ui/qml/pages/FirstPage.qml b/ui/qml/pages/FirstPage.qml index ac72f1d5..dda257db 100644 --- a/ui/qml/pages/FirstPage.qml +++ b/ui/qml/pages/FirstPage.qml @@ -11,21 +11,18 @@ PagePL { function unpairAccepted() { DaemonInterfaceInstance.disconnect(); - app.pages.push(Qt.resolvedUrl("./PairSelectDeviceType.qml")); } pageMenu: PageMenuPL { PageMenuItemPL { text: qsTr("Pair with watch") onClicked: { - var page = AmazfishConfig.pairedAddress - ? "UnpairDeviceDialog.qml" - : "PairSelectDeviceType.qml" - - var obj = app.pages.push(Qt.resolvedUrl(page)); - if (AmazfishConfig.pairedAddress) { + var obj = app.pages.push(Qt.resolvedUrl("UnpairDeviceDialog.qml")); + obj.acceptDestination = Qt.resolvedUrl("PairSelectDeviceType.qml") obj.accepted.connect(unpairAccepted); + } else { + app.pages.push(Qt.resolvedUrl("PairSelectDeviceType.qml")); } } }