mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 09:03:25 +00:00
Save a dive has to mean "save to local storage" on mobile
While it makes sense to have the concept of "what's in memory" and "what's on disk" in a desktop application, on a mobile device that seems like the wrong approach. If the user edits a dive and taps on "save", they reasonably expect this to be saved to storage (so our local cache of the remote git repository). And "Upload to cloud" then pushes the data to the cloud server. It may even be reasonable to do that automagically, but that I'm not so sure about. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
60d5463311
commit
a27d78af03
1 changed files with 7 additions and 0 deletions
|
@ -471,6 +471,13 @@ QString QMLManager::commitChanges(QString diveId, QString date, QString location
|
|||
if (diveChanged || needResort) {
|
||||
refreshDiveList();
|
||||
mark_divelist_changed(true);
|
||||
// this is called "commit" for a reason - when the user saves an
|
||||
// edit they have a reasonable expectation that their data is actually
|
||||
// stored - so we need to store this to the local cache
|
||||
qDebug() << "save dives to local cache";
|
||||
prefs.cloud_background_sync = false;
|
||||
saveChanges();
|
||||
prefs.cloud_background_sync = true;
|
||||
}
|
||||
return notes;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue