mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Avoid race conditions between the home screen's crash alert and Sentry's onLastRunStatusDetermined
By converting the `lastCrashEventID` to a publisher that the VM can just listen to instead of relying on start to match a pre-set event
This commit is contained in:
@@ -1018,7 +1018,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
options.onLastRunStatusDetermined = { status, event in
|
||||
guard case .didCrash = status, let event else { return }
|
||||
MXLog.error("Sentry detected a crash in the previous run: \(event.eventId.sentryIdString)")
|
||||
bugReportService.lastCrashEventID = event.eventId.sentryIdString
|
||||
bugReportService.lastCrashEventIDSubject.send(event.eventId.sentryIdString)
|
||||
}
|
||||
|
||||
// Mirror every crash into our own logs (which ship with rageshakes) before it's sent to Sentry.
|
||||
|
||||
Reference in New Issue
Block a user