mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Camera and editor improvements
This commit is contained in:
@@ -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()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user