Skip to content

Commit

Permalink
fix throwing task compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio Alescio committed May 12, 2023
1 parent 8919001 commit d64577b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d64577b

Please sign in to comment.