mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Push the setting of authError to happen on MainActor
- The Xcode “Run Time Issue” breakpoint was being hit whenever an error was being set, complaining about this being set outside of the main thread.
This commit is contained in:
parent
a43bf63aab
commit
cc03660576
1 changed files with 7 additions and 2 deletions
|
|
@ -405,7 +405,9 @@ class AppState: ObservableObject {
|
|||
// we don't have to show an error
|
||||
// because the sheet will already be dismissed
|
||||
} catch {
|
||||
authError = error
|
||||
Task { @MainActor in
|
||||
authError = error
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -418,7 +420,10 @@ class AppState: ObservableObject {
|
|||
do {
|
||||
return try fido2.deviceHasPin()
|
||||
} catch {
|
||||
authError = error
|
||||
Task { @MainActor in
|
||||
authError = error
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue