Skip to content

Commit

Permalink
Add comment around button + search activation hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmoldrich committed Jan 18, 2025
1 parent 1dfd25d commit f5bbb2b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Views/SearchResults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ struct SearchResults: View {

var body: some View {
Group {
// Conditionally show hidden button to enable down key response when
// search button is shown.
//
// Ideally this functionality should be captured in the standard search
// suggestions widget but the inbuilt UI for this is very narrow and
// the search results very large.
if isSearching, searchFocus == nil {
Button(action: {
searchFocus = viewModel.results.first?.id
}, label: {})
// .opacity(0)
.opacity(0)
.keyboardShortcut(.downArrow, modifiers: [])
}
if zimFiles.isEmpty {
Expand Down

0 comments on commit f5bbb2b

Please sign in to comment.