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>
This commit is contained in:
Berthold Stoeger 2020-03-31 14:29:51 +02:00 committed by Dirk Hohndel
parent 6dbc9ca4b0
commit 82f6c60856

View file

@ -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();