format code

This commit is contained in:
2026-05-24 20:40:56 +02:00
parent 2346ca1b49
commit 40e840ee50
12 changed files with 526 additions and 497 deletions
@@ -1,16 +1,16 @@
import SwiftUI
struct NoteTextEditor: View {
@Binding var text: String
let remoteText: String?
@State private var selection: TextSelection? = nil
var body: some View {
TextEditor(text: $text, selection: $selection)
.onChange(of: remoteText) { oldValue, newValue in
guard let newValue, newValue != text else { return }
// Apply remote text first
text = newValue
}
}
@Binding var text: String
let remoteText: String?
@State private var selection: TextSelection? = nil
var body: some View {
TextEditor(text: $text, selection: $selection)
.onChange(of: remoteText) { oldValue, newValue in
guard let newValue, newValue != text else { return }
// Apply remote text first
text = newValue
}
}
}