Skip to content

Commit 94eb53c

Browse files
VideoMessageCameraScreen: fix parameter shadowing of SwiftSignalKit timeout() (build break)
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
1 parent 004011b commit 94eb53c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## [Unreleased]
88

9-
## [v12.9.2-4019-pre]
9+
## [v12.9.2-4020-pre]
1010

1111
### Fixed
1212
- **Video messages: recording stuck on an infinite loading state.** A wedged capture session never emitted the preview-ready signal the hold-to-record button waits for, so the button spun forever and recording never started — only restarting the phone helped (upstream issue #1772). Camera readiness now has a 10s timeout: the capture session is torn down and recreated (bounded at 2 resets per screen), and a timed-out recording attempt fails cleanly instead of spinning.

‎submodules/TelegramUI/Components/VideoMessageCameraScreen/Sources/VideoMessageCameraScreen.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ public class VideoMessageCameraScreen: ViewController {
10351035
self.backgroundView.removeFromSuperview()
10361036
}
10371037

1038-
func withReadyCamera(isFirstTime: Bool = false, timeout: Double = 10.0, onTimeout: (() -> Void)? = nil, _ f: @escaping () -> Void) {
1038+
func withReadyCamera(isFirstTime: Bool = false, timeoutDuration: Double = 10.0, onTimeout: (() -> Void)? = nil, _ f: @escaping () -> Void) {
10391039
let previewReady: Signal<Bool, NoError>
10401040
if #available(iOS 13.0, *) {
10411041
previewReady = self.cameraState.isDualCameraEnabled ? self.additionalPreviewView.isPreviewing : self.mainPreviewView.isPreviewing |> delay(0.3, queue: Queue.mainQueue())
@@ -1050,7 +1050,7 @@ public class VideoMessageCameraScreen: ViewController {
10501050
let _ = (previewReady
10511051
|> filter { $0 }
10521052
|> take(1)
1053-
|> timeout(timeout, queue: Queue.mainQueue(), alternate: .single(false))
1053+
|> timeout(timeoutDuration, queue: Queue.mainQueue(), alternate: .single(false))
10541054
|> deliverOnMainQueue).startStandalone(next: { ready in
10551055
if ready {
10561056
f()

0 commit comments

Comments
 (0)