mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-08 19:10:53 +00:00
Various fixes
This commit is contained in:
parent
02a2c2d359
commit
840c80546f
@ -260,23 +260,25 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
||||
controller.updateCameraState({ $0.updatedRecording(pressing ? .holding : .handsFree).updatedDuration(initialDuration) }, transition: .spring(duration: 0.4))
|
||||
|
||||
controller.node.withReadyCamera(isFirstTime: !controller.node.cameraIsActive) {
|
||||
self.resultDisposable.set((camera.startRecording()
|
||||
|> deliverOnMainQueue).start(next: { [weak self] recordingData in
|
||||
let duration = initialDuration + recordingData.duration
|
||||
if let self, let controller = self.getController() {
|
||||
controller.updateCameraState({ $0.updatedDuration(duration) }, transition: .easeInOut(duration: 0.1))
|
||||
if isFirstRecording {
|
||||
controller.node.setupLiveUpload(filePath: recordingData.filePath)
|
||||
Queue.mainQueue().after(0.15) {
|
||||
self.resultDisposable.set((camera.startRecording()
|
||||
|> deliverOnMainQueue).start(next: { [weak self] recordingData in
|
||||
let duration = initialDuration + recordingData.duration
|
||||
if let self, let controller = self.getController() {
|
||||
controller.updateCameraState({ $0.updatedDuration(duration) }, transition: .easeInOut(duration: 0.1))
|
||||
if isFirstRecording {
|
||||
controller.node.setupLiveUpload(filePath: recordingData.filePath)
|
||||
}
|
||||
if duration > 59.5 {
|
||||
controller.onStop()
|
||||
}
|
||||
}
|
||||
if duration > 59.5 {
|
||||
controller.onStop()
|
||||
}, error: { [weak self] _ in
|
||||
if let self, let controller = self.getController() {
|
||||
controller.completion(nil, nil, nil)
|
||||
}
|
||||
}
|
||||
}, error: { [weak self] _ in
|
||||
if let self, let controller = self.getController() {
|
||||
controller.completion(nil, nil, nil)
|
||||
}
|
||||
}))
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
if initialDuration > 0.0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user