diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-03-28 10:33:10 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-28 11:00:09 -0700 |
commit | 98966fdd8a55314acf25fc3e936a2398b2ea7480 (patch) | |
tree | 61832a2f608c5b21b7559ad1575268561921d10a /mobile-widgets/qmlmanager.h | |
parent | 73bbe1f02bf1a62ff363ed80cfec42f3545036cd (diff) | |
download | subsurface-98966fdd8a55314acf25fc3e936a2398b2ea7480.tar.gz |
mobile/save-changes: untangle the handling of alreadySaving
I'm suspicious that an issue that some people have seen around changes
not being saved is caused by our handling of alreadySaving.
When starting with Subsurface-mobile in no-autosync mode, we were able
to end in a scenario where alreadySaving was true, even though there
were no unsaved changes. And in that case no changes made during such a
session were saved unless the user forced a manual sync with the server.
This commit radically changes our approach to handling the flag. It
moves it right next to the actual calls into code that could modify git
storage, and ensures that the flag can never stay set.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.h')
-rw-r--r-- | mobile-widgets/qmlmanager.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index cadbe4973..f3440cf75 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -260,6 +260,7 @@ private: bool checkLocation(DiveSiteChange &change, const DiveObjectHelper &myDive, struct dive *d, QString location, QString gps); bool checkDuration(const DiveObjectHelper &myDive, struct dive *d, QString duration); bool checkDepth(const DiveObjectHelper &myDive, struct dive *d, QString depth); + int openAndMaybeSync(const char *filename); bool currentGitLocalOnly; Q_INVOKABLE DCDeviceData *m_device_data; QString m_progressMessage; |