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 (#2246)

Co-authored-by: John Nguyen <28632506+johnxnguyen@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and johnxnguyen authored Dec 5, 2024
1 parent 0da7140 commit 57ac870
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wire-ios-build-assets
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 57ac870

Please sign in to comment.