From 49e89cf3f1bf74b27880a6e1c688e8d2be56366c Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 2 Jan 2026 18:48:05 +0100 Subject: [PATCH] fix: satisfy swiftformat for ios build --- apps/ios/Sources/Camera/CameraController.swift | 4 ++-- .../ClawdisKit/Sources/ClawdisChatUI/ChatComposer.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/ios/Sources/Camera/CameraController.swift b/apps/ios/Sources/Camera/CameraController.swift index a8ff23581..b413f8405 100644 --- a/apps/ios/Sources/Camera/CameraController.swift +++ b/apps/ios/Sources/Camera/CameraController.swift @@ -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) } } diff --git a/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatComposer.swift b/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatComposer.swift index 9bdd2bc93..d34c03a53 100644 --- a/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatComposer.swift +++ b/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatComposer.swift @@ -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