fix: make search bar always visible instead of toggle-behind-icon

Removed the magnifying-glass toolbar button and the isSearching state
it drove -- .searchable() now shows the search field unconditionally,
which is simpler and was requested after hands-on use showed the extra
tap added no value. Updated the spec to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WYqycDFsynHH9VnnK7LNSf
This commit is contained in:
2026-09-19 19:08:36 +02:00
co-authored by Claude Sonnet 5
parent ee675471f5
commit da5ad145b0
2 changed files with 2 additions and 11 deletions
+1 -10
View File
@@ -4,7 +4,6 @@ import MyPassCore
struct EntryListView: View {
@ObservedObject var vm: VaultViewModel
@State private var isSearching = false
@State private var showAddEntry = false
var body: some View {
@@ -25,16 +24,8 @@ struct EntryListView: View {
}
}
.navigationTitle("MyPass")
.searchable(text: $vm.searchQuery, isPresented: $isSearching, prompt: "Search entries…")
.searchable(text: $vm.searchQuery, prompt: "Search entries…")
.toolbar {
ToolbarItem(placement: .primaryAction) {
Button {
if isSearching { vm.searchQuery = "" }
isSearching.toggle()
} label: {
Image(systemName: "magnifyingglass")
}
}
ToolbarItem(placement: .primaryAction) {
Button { showAddEntry = true } label: {
Image(systemName: "plus")