From 82f6c608566838bbfe134e336e687a5d50e0f128 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 31 Mar 2020 14:29:51 +0200 Subject: [PATCH] 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 --- mobile-widgets/qmlmanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();