diff options
| author | Dustin Mierau <dustin@mierau.me> | 2025-10-24 14:21:34 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2025-10-24 14:21:34 -0700 |
| commit | 9491be2c0e5e4d52258b691ffe232be5bd83268b (patch) | |
| tree | 65f52203c48dcc73c3e0b6e73c9e0853d88d3c59 /Hotline/macOS/FilesView.swift | |
| parent | 1118b224e4a6561e55e757b8b826780be1444f07 (diff) | |
Add cmd-f to activate search in Files.
Diffstat (limited to 'Hotline/macOS/FilesView.swift')
| -rw-r--r-- | Hotline/macOS/FilesView.swift | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Hotline/macOS/FilesView.swift b/Hotline/macOS/FilesView.swift index f9fb36f..3447b28 100644 --- a/Hotline/macOS/FilesView.swift +++ b/Hotline/macOS/FilesView.swift @@ -215,6 +215,7 @@ struct FilesView: View { @State private var fileDetails: FileDetails? @State private var uploadFileSelectorDisplayed: Bool = false @State private var searchText: String = "" + @State private var isSearching: Bool = false private var isShowingSearchResults: Bool { switch model.fileSearchStatus { @@ -436,7 +437,8 @@ struct FilesView: View { .frame(maxWidth: .infinity) } } - .searchable(text: $searchText, placement: .automatic, prompt: "Search") + .searchable(text: $searchText, isPresented: $isSearching, placement: .automatic, prompt: "Search") + .background(Button("", action: { isSearching = true }).keyboardShortcut("f").hidden()) .toolbar { ToolbarItemGroup(placement: .automatic) { Button { |