Skip to content

Commit

Permalink
Merge branch 'dialog-via-acceptdestination' into pair-vs-connect
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlich committed Nov 22, 2024
2 parents 784abf8 + 2d1aff4 commit d0fb44a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions ui/qml/components/platform.kirigami/DialogPL.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
11 changes: 4 additions & 7 deletions ui/qml/pages/FirstPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
}
}
Expand Down

0 comments on commit d0fb44a

Please sign in to comment.