Various fixes

This commit is contained in:
Ilya Laktyushin
2023-06-29 22:36:03 +02:00
parent ffcc989aee
commit 3b6c81e9b1
2 changed files with 8 additions and 4 deletions

View File

@@ -1308,7 +1308,7 @@ public class CameraScreen: ViewController {
gestureRecognizer.isEnabled = true gestureRecognizer.isEnabled = true
} }
} }
case .ended: case .ended, .cancelled:
let velocity = gestureRecognizer.velocity(in: self.view) let velocity = gestureRecognizer.velocity(in: self.view)
let transitionFraction = 1.0 - max(0.0, translation.x * -1.0) / self.frame.width let transitionFraction = 1.0 - max(0.0, translation.x * -1.0) / self.frame.width
controller.completeWithTransitionProgress(transitionFraction, velocity: abs(velocity.x), dismissing: true) controller.completeWithTransitionProgress(transitionFraction, velocity: abs(velocity.x), dismissing: true)

View File

@@ -705,9 +705,13 @@ final class MediaEditorScreenComponent: Component {
guard let controller = environment.controller() as? MediaEditorScreen else { guard let controller = environment.controller() as? MediaEditorScreen else {
return return
} }
controller.openPrivacySettings(completion: { [weak controller] in if controller.isEditingStory {
controller?.requestCompletion(animated: true) controller.requestCompletion(animated: true)
}) } else {
controller.openPrivacySettings(completion: { [weak controller] in
controller?.requestCompletion(animated: true)
})
}
} }
)), )),
environment: {}, environment: {},