More search UI improvements across all the platforms

This commit is contained in:
Arkadiusz Fal
2021-09-26 19:40:25 +02:00
parent 4e0d7b60f7
commit f9396985c9
16 changed files with 241 additions and 197 deletions

View File

@@ -61,6 +61,9 @@ struct TrendingView: View {
.foregroundColor(.secondary)
categoryButton
// only way to disable Menu animation is to
// force redraw of the view when it changes
.id(UUID())
}
HStack {
@@ -70,7 +73,6 @@ struct TrendingView: View {
countryButton
}
}
.transaction { t in t.animation = .none }
}
}
#endif
@@ -117,15 +119,9 @@ struct TrendingView: View {
}
#else
Menu(category.name) {
Picker("Category", selection: $category) {
ForEach(TrendingCategory.allCases) { category in
Button(action: { self.category = category }) {
if category == self.category {
Label(category.name, systemImage: "checkmark")
} else {
Text(category.name)
}
}
Text(category.name).tag(category)
}
}
#endif