mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -170,6 +170,8 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
||||
private var resultDisposable = MetaDisposable()
|
||||
|
||||
var cameraState: CameraState?
|
||||
|
||||
var didDisplayViewOnce = false
|
||||
|
||||
private let hapticFeedback = HapticFeedback()
|
||||
|
||||
@@ -355,7 +357,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
||||
}
|
||||
|
||||
if let controller = component.getController() {
|
||||
if controller.isSendingImmediately || controller.scheduledLock {
|
||||
if controller.scheduledLock {
|
||||
showViewOnce = true
|
||||
}
|
||||
if !controller.viewOnceAvailable {
|
||||
@@ -363,6 +365,12 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
||||
}
|
||||
}
|
||||
|
||||
if state.didDisplayViewOnce {
|
||||
showViewOnce = true
|
||||
} else if showViewOnce {
|
||||
state.didDisplayViewOnce = true
|
||||
}
|
||||
|
||||
if !component.isPreviewing {
|
||||
let flipButton = flipButton.update(
|
||||
component: CameraButton(
|
||||
@@ -377,6 +385,7 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
||||
)
|
||||
),
|
||||
minSize: CGSize(width: 44.0, height: 44.0),
|
||||
isExclusive: false,
|
||||
action: { [weak state] in
|
||||
if let state {
|
||||
state.togglePosition()
|
||||
|
||||
Reference in New Issue
Block a user