diff options
| author | Christian Cleberg <[email protected]> | 2026-03-22 20:42:45 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-03-22 20:42:45 -0500 |
| commit | 1f8b7a23529462c3c332753d33810b5c9f692bbc (patch) | |
| tree | 17526dae77a7579b270e6b9cca6224c9020f772d /Hutch/Views/Inbox/InboxView.swift | |
| parent | e03791d6c15ee0caac033d1b1b390c5d65a69d57 (diff) | |
| download | hutch-1f8b7a23529462c3c332753d33810b5c9f692bbc.tar.gz hutch-1f8b7a23529462c3c332753d33810b5c9f692bbc.tar.bz2 hutch-1f8b7a23529462c3c332753d33810b5c9f692bbc.zip | |
feat: add search to builds, trackers, tickets, pastes, mailing lists, and inbox
Diffstat (limited to 'Hutch/Views/Inbox/InboxView.swift')
| -rw-r--r-- | Hutch/Views/Inbox/InboxView.swift | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Hutch/Views/Inbox/InboxView.swift b/Hutch/Views/Inbox/InboxView.swift index 74f78d5..5724964 100644 --- a/Hutch/Views/Inbox/InboxView.swift +++ b/Hutch/Views/Inbox/InboxView.swift @@ -30,7 +30,7 @@ struct InboxView: View { @Bindable var vm = viewModel List { - ForEach(viewModel.threads) { thread in + ForEach(viewModel.filteredThreads) { thread in Button { selectThread(thread) } label: { @@ -45,6 +45,11 @@ struct InboxView: View { } } } + .searchable( + text: $vm.searchText, + placement: .navigationBarDrawer(displayMode: .always), + prompt: "Search inbox" + ) .listStyle(.plain) .overlay { if viewModel.isLoading, viewModel.threads.isEmpty { @@ -55,6 +60,8 @@ struct InboxView: View { message: error, retryAction: { await viewModel.loadThreads() } ) + } else if !viewModel.threads.isEmpty, viewModel.filteredThreads.isEmpty { + ContentUnavailableView.search(text: viewModel.searchText) } else if viewModel.threads.isEmpty, viewModel.error == nil { ContentUnavailableView( "Inbox Zero", |
