Camera and editor improvements

This commit is contained in:
Ilya Laktyushin
2023-05-16 17:08:55 +04:00
parent 65ed79b44d
commit 97e871fa22
11 changed files with 168 additions and 50 deletions

View File

@@ -364,6 +364,8 @@ final class CaptureControlsComponent: Component {
private let lockImage = UIImage(bundleImageName: "Camera/LockIcon")
private let hapticFeedback = HapticFeedback()
public func matches(tag: Any) -> Bool {
if let component = self.component, let componentTag = component.tag {
let tag = tag as AnyObject
@@ -392,7 +394,6 @@ final class CaptureControlsComponent: Component {
let location = gestureRecognizer.location(in: self)
switch gestureRecognizer.state {
case .began:
self.hapticFeedback.impact(.click05)
self.component?.shutterPressed()
self.component?.swipeHintUpdated(.zoom)
self.shutterUpdateOffset.invoke((0.0, .immediate))
@@ -415,8 +416,6 @@ final class CaptureControlsComponent: Component {
}
}
private let hapticFeedback = HapticFeedback()
private var didFlip = false
private var wasBanding: Bool?
private var panBlobState: ShutterBlobView.BlobState?
@@ -667,6 +666,7 @@ final class CaptureControlsComponent: Component {
),
automaticHighlight: false,
action: { [weak self] in
self?.hapticFeedback.impact(.light)
self?.shutterUpdateOffset.invoke((0.0, .immediate))
component.shutterTapped()
},