Skip to content

Commit fd1e1cf

Browse files
committed
Update
1 parent 5e94204 commit fd1e1cf

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

Core/Sources/HostApp/General.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct General: ReducerProtocol {
1919
case failedReloading
2020
}
2121

22-
@Dependency(\.toastController) var toastController
22+
@Dependency(\.toast) var toast
2323

2424
var body: some ReducerProtocol<State, Action> {
2525
Reduce { state, action in
@@ -38,10 +38,7 @@ struct General: ReducerProtocol {
3838
try await LaunchAgentManager()
3939
.setupLaunchAgentForTheFirstTimeIfNeeded()
4040
} catch {
41-
toastController.toast(
42-
content: Text(error.localizedDescription),
43-
type: .error
44-
)
41+
toast(error.localizedDescription, .error)
4542
}
4643
}
4744
#endif
@@ -60,7 +57,7 @@ struct General: ReducerProtocol {
6057
permissionGranted: isAccessibilityPermissionGranted
6158
))
6259
} catch {
63-
toastController.toast(content: error.localizedDescription, type: .error)
60+
toast(error.localizedDescription, .error)
6461
await send(.failedReloading)
6562
}
6663
}

0 commit comments

Comments
 (0)