mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Prevent multiple file selection callbacks coming from the media upload pickers and generating incorrect transitions in the RoomFlowCoordinator state machine
This commit is contained in:
committed by
Stefan Ceriu
parent
1bbb077e3e
commit
ea91e371eb
@@ -48,7 +48,7 @@ class MediaPickerScreenCoordinator: CoordinatorProtocol {
|
||||
case .camera:
|
||||
cameraPicker
|
||||
case .photoLibrary:
|
||||
PhotoLibraryPicker { [weak self] action in
|
||||
PhotoLibraryPicker(userIndicatorController: userIndicatorController) { [weak self] action in
|
||||
switch action {
|
||||
case .cancel:
|
||||
self?.callback?(.cancel)
|
||||
@@ -62,7 +62,7 @@ class MediaPickerScreenCoordinator: CoordinatorProtocol {
|
||||
case .documents:
|
||||
// The document picker automatically dismisses everything on selection
|
||||
// Strongly retain self in the callback to forward actions correctly
|
||||
DocumentPicker { action in
|
||||
DocumentPicker(userIndicatorController: userIndicatorController) { action in
|
||||
switch action {
|
||||
case .cancel:
|
||||
self.callback?(.cancel)
|
||||
@@ -77,7 +77,7 @@ class MediaPickerScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
|
||||
private var cameraPicker: some View {
|
||||
CameraPicker { [weak self] action in
|
||||
CameraPicker(userIndicatorController: userIndicatorController) { [weak self] action in
|
||||
switch action {
|
||||
case .cancel:
|
||||
self?.callback?(.cancel)
|
||||
|
||||
Reference in New Issue
Block a user