mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +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 PhotoLibraryPickerError: Error {
|
||||
}
|
||||
|
||||
struct PhotoLibraryPicker: UIViewControllerRepresentable {
|
||||
private weak var userIndicatorController: UserIndicatorControllerProtocol?
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
private let callback: (PhotoLibraryPickerAction) -> Void
|
||||
|
||||
init(userIndicatorController: UserIndicatorControllerProtocol?, callback: @escaping (PhotoLibraryPickerAction) -> Void) {
|
||||
init(userIndicatorController: UserIndicatorControllerProtocol, callback: @escaping (PhotoLibraryPickerAction) -> Void) {
|
||||
self.userIndicatorController = userIndicatorController
|
||||
self.callback = callback
|
||||
}
|
||||
@@ -73,9 +73,9 @@ struct PhotoLibraryPicker: UIViewControllerRepresentable {
|
||||
|
||||
picker.delegate = nil
|
||||
|
||||
photoLibraryPicker.userIndicatorController?.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier, type: .modal, title: L10n.commonLoading))
|
||||
photoLibraryPicker.userIndicatorController.submitIndicator(UserIndicator(id: Self.loadingIndicatorIdentifier, type: .modal, title: L10n.commonLoading))
|
||||
defer {
|
||||
photoLibraryPicker.userIndicatorController?.retractIndicatorWithId(Self.loadingIndicatorIdentifier)
|
||||
photoLibraryPicker.userIndicatorController.retractIndicatorWithId(Self.loadingIndicatorIdentifier)
|
||||
}
|
||||
|
||||
provider.loadFileRepresentation(forTypeIdentifier: contentType.identifier) { [weak self] url, error in
|
||||
|
||||
Reference in New Issue
Block a user