mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various improvements
This commit is contained in:
@@ -371,6 +371,8 @@ private final class CameraScreenComponent: CombinedComponent {
|
||||
self.camera.setDualCamEnabled(isEnabled)
|
||||
self.cameraState = self.cameraState.updatedIsDualCamEnabled(isEnabled)
|
||||
self.updated(transition: .easeInOut(duration: 0.1))
|
||||
|
||||
self.hapticFeedback.impact(.light)
|
||||
}
|
||||
|
||||
func updateSwipeHint(_ hint: CaptureControlsComponent.SwipeHint) {
|
||||
@@ -1607,13 +1609,11 @@ public class CameraScreen: ViewController {
|
||||
}
|
||||
|
||||
func presentDraftTooltip() {
|
||||
guard let sourceView = self.componentHost.findTaggedView(tag: galleryButtonTag) else {
|
||||
guard let sourceView = self.componentHost.findTaggedView(tag: galleryButtonTag), let absoluteLocation = sourceView.superview?.convert(sourceView.center, to: self.view) else {
|
||||
return
|
||||
}
|
||||
|
||||
let parentFrame = self.view.convert(self.bounds, to: nil)
|
||||
let absoluteFrame = sourceView.convert(sourceView.bounds, to: nil).offsetBy(dx: -parentFrame.minX, dy: 0.0)
|
||||
let location = CGRect(origin: CGPoint(x: absoluteFrame.midX, y: absoluteFrame.minY - 4.0), size: CGSize())
|
||||
let location = CGRect(origin: CGPoint(x: absoluteLocation.x, y: absoluteLocation.y - 29.0), size: CGSize())
|
||||
|
||||
let controller = TooltipScreen(account: self.context.account, sharedContext: self.context.sharedContext, text: .plain(text: "Draft Saved"), location: .point(location, .bottom), displayDuration: .default, inset: 16.0, shouldDismissOnTouch: { _ in
|
||||
return .ignore
|
||||
|
||||
Reference in New Issue
Block a user