fix: satisfy swiftformat for ios build

This commit is contained in:
Peter Steinberger
2026-01-02 18:48:05 +01:00
parent 43f6b9ef32
commit 49e89cf3f1
2 changed files with 3 additions and 3 deletions

View File

@@ -192,7 +192,6 @@ actor CameraController {
func listDevices() -> [CameraDeviceInfo] {
let types: [AVCaptureDevice.DeviceType] = [
.builtInWideAngleCamera,
.externalUnknown,
]
let session = AVCaptureDevice.DiscoverySession(
deviceTypes: types,
@@ -308,7 +307,8 @@ actor CameraController {
private nonisolated static func sleepDelayMs(_ delayMs: Int) async {
guard delayMs > 0 else { return }
let ns = UInt64(min(delayMs, 10_000)) * 1_000_000
let maxDelayMs = 10 * 1000
let ns = UInt64(min(delayMs, maxDelayMs)) * UInt64(NSEC_PER_MSEC)
try? await Task.sleep(nanoseconds: ns)
}
}

View File

@@ -440,7 +440,7 @@ private struct ChatComposerTextView: NSViewRepresentable {
// Always allow clearing the text (e.g. after send), even while editing.
// Only skip other updates while editing to avoid cursor jumps.
let shouldClear = self.text.isEmpty && !textView.string.isEmpty
if isEditing && !shouldClear { return }
if isEditing, !shouldClear { return }
if textView.string != self.text {
context.coordinator.isProgrammaticUpdate = true