mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
[DeckSync] Address auto-sync review: disconnect, backfill and modal conflicts
- Fail the run when the connection drops while a sync is running, and clear the active conflict, so the queue is not sent on a dead client and a re-login as another account never receives this profile's uploads. - Backfill last_modified from upload_time in the 37 -> 38 migration and drop the "last_modified is null" arm from the sync-check query, so rows that predate the column stop reporting as changed on every poll. - Skip conflicts during auto runs and report how many were skipped, instead of opening the modal conflict dialog from a timer or a file-watcher event.
This commit is contained in:
parent
00cb839a30
commit
6d67b76fa3
4 changed files with 41 additions and 3 deletions
|
|
@ -159,6 +159,7 @@ private:
|
|||
qint64 lastModifiedSecs = 0;
|
||||
};
|
||||
|
||||
void startSync(bool autoRun);
|
||||
void failSync(const QString &error);
|
||||
void finishSync();
|
||||
[[nodiscard]] SyncSummary currentSummary() const;
|
||||
|
|
@ -240,6 +241,8 @@ private:
|
|||
int downloadedCount = 0;
|
||||
int unchangedCount = 0;
|
||||
int skippedCount = 0;
|
||||
int conflictCount = 0;
|
||||
bool autoRun = false;
|
||||
};
|
||||
|
||||
#endif // DECK_SYNC_MANAGER_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue