mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile/download-from-DC: ensure that changes get actually saved
Calling saveChangesLocal() seems like the right thing to do, but it doesn't do anything useful if the dive list hasn't been marked as changed. The correct helper function to call is changesNeedSaving() which makes sure we save the changes and update all UI information. [Berthold: since this removes the last QML caller of saveChangesLocal() we can make that function private.] Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
35080aad98
commit
e43362fdcf
2 changed files with 2 additions and 2 deletions
|
@ -467,7 +467,7 @@ Kirigami.Page {
|
|||
importModel.recordDives()
|
||||
// it's important to save the changes because the app could get killed once
|
||||
// it's in the background - and the freshly downloaded dives would get lost
|
||||
manager.saveChangesLocal()
|
||||
manager.changesNeedSaving()
|
||||
pageStack.pop()
|
||||
showDiveList()
|
||||
download.text = qsTr("Download")
|
||||
|
|
|
@ -186,7 +186,6 @@ public slots:
|
|||
void addDiveToTrip(int id, int tripId);
|
||||
void changesNeedSaving();
|
||||
void openNoCloudRepo();
|
||||
void saveChangesLocal();
|
||||
void saveChangesCloud(bool forceRemoteSync);
|
||||
void selectDive(int id);
|
||||
void deleteDive(int id);
|
||||
|
@ -277,6 +276,7 @@ private:
|
|||
void consumeFinishedLoad();
|
||||
void mergeLocalRepo();
|
||||
void openLocalThenRemote(QString url);
|
||||
void saveChangesLocal();
|
||||
|
||||
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
|
||||
QString appLogFileName;
|
||||
|
|
Loading…
Add table
Reference in a new issue