Various fixes

This commit is contained in:
Ilya Laktyushin
2024-01-18 16:25:35 +04:00
parent 64d5a443d7
commit efa1212fa6
3 changed files with 20 additions and 4 deletions

View File

@@ -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()