Only record query breadcrumbs when the search is submitted

Queries were previously stored whenever a result was selected, which
meant half-typed queries ended up in the history. Now a query is only
recorded when the user submits the search field, while selecting a
result only records the room.
This commit is contained in:
Stefan Ceriu
2026-09-29 14:53:02 +03:00
parent bc018251c7
commit 313365ad83
4 changed files with 22 additions and 12 deletions
@@ -91,6 +91,7 @@ struct SearchScreen: View {
.scrollDismissesKeyboard(.immediately)
.background(tabShortcuts)
.onSubmit(of: .search) {
context.send(viewAction: .submitQuery)
// A software keyboard's submit/search button just dismisses; only a hardware return selects.
if isHardwareKeyboardConnected, selectedID != nil {
selectCurrent()