summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-10-09 10:23:24 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-09 10:03:21 -0700
commita95e6589469a0998fba4d5248556a8c9337f22b0 (patch)
tree160b6207f1756c8f1d91e6173cde5cc6c83bb8d4 /mobile-widgets/qml
parent87b8155576cf04b0a002c80690f1222f3fec7935 (diff)
downloadsubsurface-a95e6589469a0998fba4d5248556a8c9337f22b0.tar.gz
Mobile: factor out syncToCloud [3/3]
After the previous commits, we now have a preference that nicely preserves the state of the UI, and we have the well known git_local_only global, that is used to denote whether we want to use to local repo only, or we want to interact with the online cloud as well. This commit gets rid of the now superfluous syncToCloud logic. Instead we simply set the git_local_only directly. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/CloudCredentials.qml2
-rw-r--r--mobile-widgets/qml/main.qml3
2 files changed, 2 insertions, 3 deletions
diff --git a/mobile-widgets/qml/CloudCredentials.qml b/mobile-widgets/qml/CloudCredentials.qml
index 7b4ea12fb..02d66c86e 100644
--- a/mobile-widgets/qml/CloudCredentials.qml
+++ b/mobile-widgets/qml/CloudCredentials.qml
@@ -143,7 +143,7 @@ Item {
id: toNoCloudMode
text: qsTr("No cloud mode")
onClicked: {
- manager.syncToCloud = false
+ manager.setGitLocalOnly(true)
PrefCloudStorage.cloud_auto_sync = false
prefs.credentialStatus = CloudStatus.CS_NOCLOUD
manager.saveCloudCredentials()
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index fb63ed0c3..4818d2a83 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -28,7 +28,6 @@ Kirigami.ApplicationWindow {
}
property alias oldStatus: prefs.oldStatus
property alias notificationText: manager.notificationText
- property alias syncToCloud: manager.syncToCloud
property alias locationServiceEnabled: manager.locationServiceEnabled
property alias pluggedInDeviceName: manager.pluggedInDeviceName
property alias showPin: prefs.showPin
@@ -279,7 +278,7 @@ Kirigami.ApplicationWindow {
visible: prefs.credentialStatus !== CloudStatus.CS_NOCLOUD
onTriggered: {
PrefCloudStorage.cloud_auto_sync = !PrefCloudStorage.cloud_auto_sync
- syncToCloud = PrefCloudStorage.cloud_auto_sync
+ manager.setGitLocalOnly(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' \