mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Have the UserIndicatorController use a separate window, switch to using one single instance throughout the application
This commit is contained in:
committed by
Stefan Ceriu
parent
1102beb3dd
commit
4b26a798dc
@@ -29,10 +29,10 @@ enum CameraPickerError: Error {
|
||||
}
|
||||
|
||||
struct CameraPicker: UIViewControllerRepresentable {
|
||||
private weak var userIndicatorController: UserIndicatorControllerProtocol?
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
private let callback: (CameraPickerAction) -> Void
|
||||
|
||||
init(userIndicatorController: UserIndicatorControllerProtocol?, callback: @escaping (CameraPickerAction) -> Void) {
|
||||
init(userIndicatorController: UserIndicatorControllerProtocol, callback: @escaping (CameraPickerAction) -> Void) {
|
||||
self.userIndicatorController = userIndicatorController
|
||||
self.callback = callback
|
||||
}
|
||||
@@ -68,9 +68,9 @@ struct CameraPicker: UIViewControllerRepresentable {
|
||||
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) {
|
||||
picker.delegate = nil
|
||||
|
||||
cameraPicker.userIndicatorController?.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier, type: .modal, title: L10n.commonLoading))
|
||||
cameraPicker.userIndicatorController.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier, type: .modal, title: L10n.commonLoading))
|
||||
defer {
|
||||
cameraPicker.userIndicatorController?.retractIndicatorWithId(Self.loadingIndicatorIdentifier)
|
||||
cameraPicker.userIndicatorController.retractIndicatorWithId(Self.loadingIndicatorIdentifier)
|
||||
}
|
||||
|
||||
if let videoURL = info[.mediaURL] as? URL {
|
||||
|
||||
Reference in New Issue
Block a user