fix throwing task compile error

This commit is contained in:
Flavio Alescio
2023-05-11 14:34:18 +02:00
committed by Flescio
parent 80dc300884
commit 41094cb293
2 changed files with 12 additions and 2 deletions
@@ -109,7 +109,11 @@ class SessionVerificationScreenViewModel: SessionVerificationViewModelType, Sess
case (_, _, .verified):
// Dismiss the success screen automatically.
Task {
try await Task.sleep(for: .seconds(2))
do {
try await Task.sleep(for: .seconds(2))
} catch {
MXLog.error(error.localizedDescription)
}
self.callback?(.finished)
}
default:
@@ -81,7 +81,13 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
let client = try UITestsSignalling.Client(mode: .app)
signalCancellable = client.signals.sink { [weak self] signal in
Task { try await self?.handleSignal(signal) }
Task {
do {
try await self?.handleSignal(signal)
} catch {
MXLog.error(error.localizedDescription)
}
}
}
self.client = client