From 67239733f238909dcab1fc48decdb7b7e994bc8c Mon Sep 17 00:00:00 2001 From: Peter <> Date: Fri, 4 Oct 2019 23:52:23 +0400 Subject: [PATCH] Disable interactive dismiss on location screens --- submodules/LocationUI/Sources/LegacyLocationController.swift | 3 +++ submodules/LocationUI/Sources/LegacyLocationPicker.swift | 2 ++ 2 files changed, 5 insertions(+) diff --git a/submodules/LocationUI/Sources/LegacyLocationController.swift b/submodules/LocationUI/Sources/LegacyLocationController.swift index f4b1126ba7..4548a96b99 100644 --- a/submodules/LocationUI/Sources/LegacyLocationController.swift +++ b/submodules/LocationUI/Sources/LegacyLocationController.swift @@ -267,6 +267,9 @@ public func legacyLocationController(message: Message?, mapMedia: TelegramMediaM } legacyController.bind(controller: controller) + controller.view.disablesInteractiveModalDismiss = true + controller.view.disablesInteractiveTransitionGestureRecognizer = true + let presentationDisposable = context.sharedContext.presentationData.start(next: { [weak controller] presentationData in if let controller = controller { controller.pallete = legacyLocationPalette(from: presentationData.theme) diff --git a/submodules/LocationUI/Sources/LegacyLocationPicker.swift b/submodules/LocationUI/Sources/LegacyLocationPicker.swift index 46b8d573aa..559ba9710d 100644 --- a/submodules/LocationUI/Sources/LegacyLocationPicker.swift +++ b/submodules/LocationUI/Sources/LegacyLocationPicker.swift @@ -32,6 +32,8 @@ public func legacyLocationPickerController(context: AccountContext, selfPeer: Pe if namespacesWithEnabledLiveLocation.contains(peer.id.namespace) && !customLocationPicker && hasLiveLocation { controller.allowLiveLocationSharing = true } + controller.view.disablesInteractiveModalDismiss = true + controller.view.disablesInteractiveTransitionGestureRecognizer = true let navigationController = TGNavigationController(controllers: [controller])! controller.navigation_setDismiss({ [weak legacyController] in legacyController?.dismiss()