mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-20 06:32:08 +02:00
Merge pull request #4320 from vector-im/element_4293
Handle iOS 13 Screen Pull-Down Gesture
This commit is contained in:
@@ -6,9 +6,11 @@ Changes to be released in next version
|
||||
|
||||
🙌 Improvements
|
||||
* NSE: Add logs for notification delay.
|
||||
* Templates: Update bridge presenter template to auto-implement iOS 13 pull-down gesture.
|
||||
|
||||
🐛 Bugfix
|
||||
* NSE: Fixes to avoid PushKit crashes (#4269).
|
||||
* Handle pull-down gesture for reactions history view (#4293).
|
||||
|
||||
⚠️ API Changes
|
||||
*
|
||||
|
||||
@@ -60,6 +60,7 @@ final class ReactionHistoryCoordinatorBridgePresenter: NSObject {
|
||||
|
||||
let coordinatorPresentable = reactionHistoryCoordinator.toPresentable()
|
||||
coordinatorPresentable.modalPresentationStyle = .formSheet
|
||||
coordinatorPresentable.presentationController?.delegate = self
|
||||
viewController.present(coordinatorPresentable, animated: animated, completion: nil)
|
||||
|
||||
reactionHistoryCoordinator.start()
|
||||
@@ -87,3 +88,13 @@ extension ReactionHistoryCoordinatorBridgePresenter: ReactionHistoryCoordinatorD
|
||||
self.delegate?.reactionHistoryCoordinatorBridgePresenterDelegateDidClose(self)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UIAdaptivePresentationControllerDelegate
|
||||
|
||||
extension ReactionHistoryCoordinatorBridgePresenter: UIAdaptivePresentationControllerDelegate {
|
||||
|
||||
func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
|
||||
self.delegate?.reactionHistoryCoordinatorBridgePresenterDelegateDidClose(self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+13
-1
@@ -54,7 +54,9 @@ final class FlowTemplateCoordinatorBridgePresenter: NSObject {
|
||||
func present(from viewController: UIViewController, animated: Bool) {
|
||||
let flowTemplateCoordinator = FlowTemplateCoordinator(session: self.session)
|
||||
flowTemplateCoordinator.delegate = self
|
||||
viewController.present(flowTemplateCoordinator.toPresentable(), animated: animated, completion: nil)
|
||||
let presentable = flowTemplateCoordinator.toPresentable()
|
||||
presentable.presentationController?.delegate = self
|
||||
viewController.present(presentable, animated: animated, completion: nil)
|
||||
flowTemplateCoordinator.start()
|
||||
|
||||
self.coordinator = flowTemplateCoordinator
|
||||
@@ -80,3 +82,13 @@ extension FlowTemplateCoordinatorBridgePresenter: FlowTemplateCoordinatorDelegat
|
||||
self.delegate?.flowTemplateCoordinatorBridgePresenterDelegateDidComplete(self)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UIAdaptivePresentationControllerDelegate
|
||||
|
||||
extension FlowTemplateCoordinatorBridgePresenter: UIAdaptivePresentationControllerDelegate {
|
||||
|
||||
func flowTemplateCoordinatorDidComplete(_ presentationController: UIPresentationController) {
|
||||
self.delegate?.flowTemplateCoordinatorBridgePresenterDelegateDidComplete(self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user