fix: reset sqlite on beta migration (#20735)

reset sync stream on migration

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2025-09-15 03:00:25 +05:30 committed by GitHub
parent 15f182902f
commit dcee34095b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 54 additions and 31 deletions

View file

@ -29,6 +29,7 @@ class SyncStreamService {
bool shouldReset = false;
await _syncApiRepository.streamChanges(_handleEvents, onReset: () => shouldReset = true);
if (shouldReset) {
_logger.info("Resetting sync state as requested by server");
await _syncApiRepository.streamChanges(_handleEvents);
}
}