fix: satisfy swiftformat for ios build
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user