mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:31:27 +00:00
Remove the global UserIndicatorController.alertInfo, replacing it with local alertInfo usage. (#5087)
This commit is contained in:
+5
-5
@@ -92,7 +92,7 @@ class UserDetailsEditScreenViewModel: UserDetailsEditScreenViewModelType, UserDe
|
||||
|
||||
guard case let .success(maxUploadSize) = await clientProxy.maxMediaUploadSize else {
|
||||
MXLog.error("Failed to get max upload size")
|
||||
userIndicatorController.alertInfo = .init(id: .init())
|
||||
state.bindings.alertInfo = .init(id: .unknown)
|
||||
return
|
||||
}
|
||||
let mediaResult = await mediaUploadingPreprocessor.processMedia(at: url, maxUploadSize: maxUploadSize)
|
||||
@@ -101,7 +101,7 @@ class UserDetailsEditScreenViewModel: UserDetailsEditScreenViewModelType, UserDe
|
||||
case .success(.image):
|
||||
state.localMedia = try? mediaResult.get()
|
||||
case .failure, .success:
|
||||
userIndicatorController.alertInfo = .init(id: .init())
|
||||
state.bindings.alertInfo = .init(id: .failedProcessingMedia)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,9 +149,9 @@ class UserDetailsEditScreenViewModel: UserDetailsEditScreenViewModelType, UserDe
|
||||
|
||||
actionsSubject.send(.dismiss)
|
||||
} catch {
|
||||
userIndicatorController.alertInfo = .init(id: .init(),
|
||||
title: L10n.screenEditProfileErrorTitle,
|
||||
message: L10n.screenEditProfileError)
|
||||
state.bindings.alertInfo = .init(id: .saveError,
|
||||
title: L10n.screenEditProfileErrorTitle,
|
||||
message: L10n.screenEditProfileError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user