diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-29 06:24:21 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-29 14:03:50 -0700 |
commit | c6205b5819c7e7e3853b93208fb1444a02d46b71 (patch) | |
tree | fb11424cbd22043f36abb95ca55f72c23d8786e2 | |
parent | 247358be37d060fb070b92dd6768aefae40fa024 (diff) | |
download | subsurface-c6205b5819c7e7e3853b93208fb1444a02d46b71.tar.gz |
QML UI: fix order of tests when saving changes
Only check for previous cloud connection when actually trying to save
to cloud
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 9e2670242..427b184f3 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -246,6 +246,7 @@ void QMLManager::saveCloudCredentials() // just go back to the dive list setCredentialStatus(oldStatus()); } + if (!same_string(prefs.cloud_storage_password, qPrintable(cloudPassword()))) { free(prefs.cloud_storage_password); prefs.cloud_storage_password = strdup(qPrintable(cloudPassword())); @@ -864,10 +865,6 @@ void QMLManager::saveChangesCloud(bool forceRemoteSync) appendTextToLog("asked to save changes but no unsaved changes"); return; } - if (!loadFromCloud()) { - appendTextToLog("Don't save dives without loading from the cloud, first."); - return; - } if (alreadySaving) { appendTextToLog("save operation in progress already"); return; @@ -879,6 +876,11 @@ void QMLManager::saveChangesCloud(bool forceRemoteSync) if (prefs.git_local_only && !forceRemoteSync) return; + if (!loadFromCloud()) { + appendTextToLog("Don't save dives without loading from the cloud, first."); + return; + } + bool glo = prefs.git_local_only; git_storage_update_progress(false, "start save change to cloud"); prefs.git_local_only = false; |