summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-31 14:29:51 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-31 08:51:20 -0700
commit82f6c608566838bbfe134e336e687a5d50e0f128 (patch)
tree70f27d55e2228c56152f16edc4df6cb0a9b7d990
parent6dbc9ca4b01a1e776f90a2f6337d19418ca0c365 (diff)
downloadsubsurface-82f6c608566838bbfe134e336e687a5d50e0f128.tar.gz
mobile: don't call saveChangesLocal() twice on non-iOS
QMLManager::changesNeedSaving() behaves differently on iOS: it only saves locally with saveChangesLocal(), whereas all other OS save to cloud with saveChangesCloud(). Nevertheless, even for other OS saveChangesLocal() is called even though that will be called in saveChancesCloud anyway. Therefore, compile the saveChangesLocal() call in changesNeedSaving conditionally. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--mobile-widgets/qmlmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 6b4e99e89..177d0126e 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1267,8 +1267,9 @@ void QMLManager::changesNeedSaving()
// on iOS
// on all other platforms we just save the changes and be done with it
mark_divelist_changed(true);
+#if defined(Q_OS_IOS)
saveChangesLocal();
-#if !defined(Q_OS_IOS)
+#else
saveChangesCloud(false);
#endif
updateAllGlobalLists();