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:
Stefan Ceriu
2026-08-13 09:25:27 +03:00
parent 9f648803f9
commit d4d74dd8f8
14 changed files with 33 additions and 32 deletions
@@ -50,9 +50,8 @@ enum BugReportServiceError: LocalizedError {
// sourcery: AutoMockable
protocol BugReportServiceProtocol: AnyObject {
var isEnabled: Bool { get }
var crashedLastRun: Bool { get }
var lastCrashEventID: String? { get set }
var lastCrashEventIDSubject: CurrentValueSubject<String?, Never> { get }
func submitBugReport(_ bugReport: BugReport,
progressListener: CurrentValueSubject<Double, Never>) async -> Result<SubmitBugReportResponse, BugReportServiceError>