Camera and editor improvements

This commit is contained in:
Ilya Laktyushin
2023-06-18 18:59:21 +04:00
parent d968f3aca3
commit c0d0b3733d
4 changed files with 33 additions and 5 deletions

View File

@@ -524,6 +524,8 @@ private final class CameraScreenComponent: CombinedComponent {
} else {
captureControlsAvailableSize = availableSize
}
let animateShutter = component.animateShutter
let captureControls = captureControls.update(
component: CaptureControlsComponent(
isTablet: isTablet,
@@ -538,6 +540,7 @@ private final class CameraScreenComponent: CombinedComponent {
}
if case .none = state.cameraState.recording {
if state.cameraState.mode == .photo {
animateShutter()
state.takePhoto()
} else if state.cameraState.mode == .video {
state.startVideoRecording(pressing: false)