mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
73bbe1f02b
commit
98966fdd8a
2 changed files with 34 additions and 33 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue