Skip to content

Commit 9b8c45b

Browse files
committed
popup not needed
1 parent 5ab7cd8 commit 9b8c45b

1 file changed

Lines changed: 1 addition & 59 deletions

File tree

src/settings.qml

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6743,65 +6743,7 @@ import Qt.labs.platform 1.1
67436743
if (newDomain !== settings.garmin_domain) {
67446744
rootItem.garmin_connect_logout();
67456745
settings.garmin_domain = newDomain;
6746-
garminServerRestartDialog.open();
6747-
}
6748-
}
6749-
}
6750-
}
6751-
6752-
// Garmin Server Change Restart Dialog
6753-
Popup {
6754-
id: garminServerRestartDialog
6755-
modal: true
6756-
focus: true
6757-
closePolicy: Popup.CloseOnEscape
6758-
anchors.centerIn: Overlay.overlay
6759-
width: Math.min(parent.width * 0.9, 400)
6760-
6761-
ColumnLayout {
6762-
anchors.fill: parent
6763-
spacing: 20
6764-
6765-
Label {
6766-
text: "Restart Required"
6767-
font.pixelSize: 18
6768-
font.bold: true
6769-
Layout.fillWidth: true
6770-
horizontalAlignment: Text.AlignHCenter
6771-
}
6772-
6773-
Label {
6774-
text: "The application needs to be restarted to apply the Garmin server change."
6775-
wrapMode: Text.WordWrap
6776-
Layout.fillWidth: true
6777-
horizontalAlignment: Text.AlignHCenter
6778-
}
6779-
6780-
RowLayout {
6781-
spacing: 10
6782-
Layout.fillWidth: true
6783-
Layout.alignment: Qt.AlignHCenter
6784-
6785-
Button {
6786-
text: "Cancel"
6787-
Layout.preferredWidth: 120
6788-
onClicked: {
6789-
garminServerRestartDialog.close();
6790-
// Revert the change
6791-
var currentDomain = settings.garmin_domain;
6792-
garminServerComboBox.currentIndex = currentDomain === "garmin.cn" ? 1 : 0;
6793-
}
6794-
}
6795-
6796-
Button {
6797-
text: "Restart App"
6798-
Layout.preferredWidth: 120
6799-
highlighted: true
6800-
onClicked: {
6801-
garminServerRestartDialog.close();
6802-
toast.show("Restarting application...");
6803-
Qt.quit();
6804-
}
6746+
window.settings_restart_to_apply = true;
68056747
}
68066748
}
68076749
}

0 commit comments

Comments
 (0)