Refactor Alerts

This commit is contained in:
世界
2025-12-01 18:22:06 +08:00
parent 8e764c56eb
commit 4ddfcdb324
40 changed files with 324 additions and 224 deletions
@@ -21,7 +21,7 @@ public final class EditProfileViewModel: BaseViewModel {
try await profile.updateRemoteProfile()
environments.profileUpdate.send()
} catch {
alert = Alert(error)
alert = AlertState(error: error)
}
}
@@ -29,7 +29,7 @@ public final class EditProfileViewModel: BaseViewModel {
do {
try await ProfileManager.delete(profile)
} catch {
alert = Alert(error)
alert = AlertState(error: error)
return
}
environments.profileUpdate.send()
@@ -46,7 +46,7 @@ public final class EditProfileViewModel: BaseViewModel {
#endif
try await profile.onProfileUpdated()
} catch {
alert = Alert(error)
alert = AlertState(error: error)
return
}
isChanged = false