Skip to content

Commit

Permalink
Start syncing when receiving a background VoIP call for the cases in …
Browse files Browse the repository at this point in the history
…which the app was suspended but not terminated.
  • Loading branch information
stefanceriu committed Nov 6, 2024
1 parent 171fc2c commit 4ac527a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ElementX/Sources/Application/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
case .startCall(let roomID):
self?.handleAppRoute(.call(roomID: roomID))
case .receivedIncomingCallRequest:
// When reporting a VoIP call through the CXProvider's `reportNewIncomingVoIPPushPayload`
// the UIApplication states don't change and syncing is neither started nor ran on
// a background task. Handle both manually here.
self?.startSync()
self?.scheduleDelayedSyncStop()
default:
break
Expand Down

0 comments on commit 4ac527a

Please sign in to comment.