feat(apps): ✨ add incremental sync overlap for recent messages
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
0bffc51524
commit
982cee2982
1 changed files with 8 additions and 0 deletions
|
|
@ -46,6 +46,14 @@ final class SyncManager: BaseSyncManager<SyncStats, SyncError> {
|
|||
|
||||
static let syncSchemaVersion = 3
|
||||
|
||||
/// Overlap lookback for the incremental read. The watermark advances to the
|
||||
/// newest synced message *date* (see `runReadCycle`), and each cycle re-reads
|
||||
/// from `watermark − overlap` so messages that land below the watermark —
|
||||
/// out-of-order delivery, late SMS, or a chat.db→Date timezone/DST skew — are
|
||||
/// always re-scanned. Server upserts by external_id, so re-scanning is
|
||||
/// idempotent (no duplicates). This is the fix for silent recent-message drop.
|
||||
static let incrementalOverlapSeconds: TimeInterval = 2 * 60 * 60
|
||||
|
||||
// Module-specific @Published state (base owns isSyncing/lastSyncCompletedAt/
|
||||
// currentOperation/syncError/stats).
|
||||
@Published var contactSyncInfo = ContactSyncInfo()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue