diff options
-rw-r--r-- | mobile-widgets/qml/CloudCredentials.qml | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/main.qml | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/mobile-widgets/qml/CloudCredentials.qml b/mobile-widgets/qml/CloudCredentials.qml index b57e4b989..7b4ea12fb 100644 --- a/mobile-widgets/qml/CloudCredentials.qml +++ b/mobile-widgets/qml/CloudCredentials.qml @@ -144,6 +144,7 @@ Item { text: qsTr("No cloud mode") onClicked: { manager.syncToCloud = false + PrefCloudStorage.cloud_auto_sync = false prefs.credentialStatus = CloudStatus.CS_NOCLOUD manager.saveCloudCredentials() manager.openNoCloudRepo() diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 93f2a6c5c..fb63ed0c3 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -273,13 +273,14 @@ Kirigami.ApplicationWindow { } Kirigami.Action { icon { - name: syncToCloud ? ":/icons/ic_cloud_off.svg" : ":/icons/ic_cloud_done.svg" + name: PrefCloudStorage.cloud_auto_sync ? ":/icons/ic_cloud_off.svg" : ":/icons/ic_cloud_done.svg" } - text: syncToCloud ? qsTr("Disable auto cloud sync") : qsTr("Enable auto cloud sync") + text: PrefCloudStorage.cloud_auto_sync ? qsTr("Disable auto cloud sync") : qsTr("Enable auto cloud sync") visible: prefs.credentialStatus !== CloudStatus.CS_NOCLOUD onTriggered: { - syncToCloud = !syncToCloud - if (!syncToCloud) { + PrefCloudStorage.cloud_auto_sync = !PrefCloudStorage.cloud_auto_sync + syncToCloud = PrefCloudStorage.cloud_auto_sync + if (!PrefCloudStorage.cloud_auto_sync) { showPassiveNotification(qsTr("Turning off automatic sync to cloud causes all data to only be \ stored locally. This can be very useful in situations with limited or no network access. Please choose 'Manual sync with cloud' \ if you have network connectivity and want to sync your data to cloud storage."), 10000) |