mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user