Skip to content

Commit

Permalink
fix: slow sync instead of resync in case of no last event id - WPB-14…
Browse files Browse the repository at this point in the history
…794 (#2245)
  • Loading branch information
johnxnguyen authored Dec 4, 2024
1 parent a9b4477 commit 551b3c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wire-ios-sync-engine/Source/UserSession/SyncStatus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public class SyncStatus: NSObject, SyncStatusProtocol, SyncProgress {
public func resyncResources() {
// Refetch user settings.
ZMUser.selfUser(in: managedObjectContext).needsPropertiesUpdate = true
// Set the status.
currentSyncPhase = SyncPhase.fetchingLastUpdateEventID.nextPhase
// If we don't have a last event id, we need to get that first, otherwise the quick sync will fetch all events in the notification queue.
currentSyncPhase = hasPersistedLastEventID ? SyncPhase.fetchingLastUpdateEventID.nextPhase : .fetchingLastUpdateEventID
RequestAvailableNotification.notifyNewRequestsAvailable(nil)
log("resyncResources")
syncStateDelegate?.didStartSlowSync()
Expand Down

0 comments on commit 551b3c8

Please sign in to comment.