Fix regressions N1-N3 from re-verification
- Transcript: selection suspension clears when press ends; Latest re-enables follow fully (clears stale selection state) - Send disabled until transport ready in pending Type composer - Server URL: programmatic success-trim no longer erases its own saved-confirmation; only user edits clear it
This commit is contained in:
1 parent
afe37ad5f4
commit
f6722a223f
2 files changed
+21
-7
No files matched your search
@@ -15,6 +15,8 @@ struct SettingsView: View {
|
||||
@State private var urlJustSaved = false
|
||||
@State private var showModelPicker = false
|
||||
@FocusState private var urlFocused: Bool
|
||||
@State private var applyingTrim = false
|
||||
/// Guards the success-trim against the edit observer (N3).
|
||||
|
||||
init(settings: SettingsStore, session: VoiceSession) {
|
||||
self.settings = settings
|
||||
@@ -71,10 +73,14 @@ struct SettingsView: View {
|
||||
.accessibilityLabel("Server URL")
|
||||
.focused($urlFocused)
|
||||
.onAppear { urlText = settings.serverURL }
|
||||
.onChange(of: urlText) { _, _ in
|
||||
// Any edit clears the saved confirmation and error.
|
||||
urlJustSaved = false
|
||||
urlError = nil
|
||||
.onChange(of: urlText) { oldValue, newValue in
|
||||
// A programmatic normalization on successful Save must
|
||||
// not erase its own confirmation; only user edits do.
|
||||
guard applyingTrim == false else { return }
|
||||
if newValue != oldValue {
|
||||
urlJustSaved = false
|
||||
urlError = nil
|
||||
}
|
||||
}
|
||||
.overlay(alignment: .trailing) {
|
||||
if urlJustSaved {
|
||||
@@ -142,7 +148,11 @@ struct SettingsView: View {
|
||||
switch ServerConfig.parse(trimmed) {
|
||||
case .success:
|
||||
settings.serverURL = trimmed
|
||||
urlText = trimmed
|
||||
if trimmed != urlText {
|
||||
applyingTrim = true
|
||||
urlText = trimmed
|
||||
applyingTrim = false
|
||||
}
|
||||
urlError = nil
|
||||
urlJustSaved = true
|
||||
urlFocused = false
|
||||
|
||||
Reference in new issue
Block a user