Minor style change

This commit is contained in:
Arkadiusz Fal 2022-06-14 18:12:06 +02:00
parent d5362519d6
commit 5b0f6397d6

View File

@ -286,6 +286,18 @@ struct SearchView: View {
.foregroundColor(.secondary) .foregroundColor(.secondary)
} }
ForEach(recentItems) { item in ForEach(recentItems) { item in
recentItemButton(item)
}
}
.redrawOn(change: recentsChanged)
}
}
#if os(iOS)
.listStyle(.insetGrouped)
#endif
}
private func recentItemButton(_ item: RecentItem) -> some View {
Button { Button {
switch item.type { switch item.type {
case .query: case .query:
@ -333,14 +345,6 @@ struct SearchView: View {
removeAllButton removeAllButton
} }
} }
}
.redrawOn(change: recentsChanged)
}
}
#if os(iOS)
.listStyle(.insetGrouped)
#endif
}
private func removeButton(_ item: RecentItem) -> some View { private func removeButton(_ item: RecentItem) -> some View {
Button { Button {