summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-28 16:20:44 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-28 08:35:45 -0800
commita73ce80eeec098441141fede8877604b36a6511d (patch)
tree2f839839370728cf5cf9332a105b91084b615c7a
parentbdbaf72d272ebcb5f51d1bd196df4fcfbce5e2b4 (diff)
downloadsubsurface-a73ce80eeec098441141fede8877604b36a6511d.tar.gz
mobile-widgets/qml: don't offer manual sync to cloud in no-cloud mode
Manual sync was enabled both for CS_VERIFIED (online) and CS_NOCLOUD (offline) and then in the trigger CS_NOCLOUD lead to a login screen, potentially confusing the user. Only enable manual sync with verified cloud credentials. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/qml/main.qml19
1 files changed, 5 insertions, 14 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index 2e86fd10b..5f385a3aa 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -321,21 +321,12 @@ Kirigami.ApplicationWindow {
name: ":/icons/cloud_sync.svg"
}
text: qsTr("Manual sync with cloud")
- enabled: prefs.credentialStatus === CloudStatus.CS_VERIFIED ||
- prefs.credentialStatus === CloudStatus.CS_NOCLOUD
+ enabled: PrefCloudStorage.cloud_verification_status === CloudStatus.CS_VERIFIED
onTriggered: {
- if (prefs.credentialStatus === CloudStatus.CS_NOCLOUD) {
- returnTopPage()
- prefs.oldStatus = prefs.credentialStatus
- manager.startPageText = "Enter valid cloud storage credentials"
- prefs.credentialStatus = CloudStatus.CS_UNKNOWN
- globalDrawer.close()
- } else {
- globalDrawer.close()
- detailsWindow.endEditMode()
- manager.saveChangesCloud(true);
- globalDrawer.close()
- }
+ globalDrawer.close()
+ detailsWindow.endEditMode()
+ manager.saveChangesCloud(true);
+ globalDrawer.close()
}
}
Kirigami.Action {