Fix a few issues with search
This commit is contained in:
parent
a52f0f9fbe
commit
0fb9e60c3f
|
@ -22,17 +22,24 @@ public struct ExploreView: View {
|
||||||
loadingView
|
loadingView
|
||||||
} else if !viewModel.searchQuery.isEmpty {
|
} else if !viewModel.searchQuery.isEmpty {
|
||||||
if viewModel.isSearching {
|
if viewModel.isSearching {
|
||||||
HStack {}
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
ProgressView()
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
.listRowBackground(theme.secondaryBackgroundColor)
|
.listRowBackground(theme.secondaryBackgroundColor)
|
||||||
.listRowSeparator(.hidden)
|
.listRowSeparator(.hidden)
|
||||||
} else if let results = viewModel.results[viewModel.searchQuery], !results.isEmpty {
|
.id(UUID())
|
||||||
makeSearchResultsView(results: results)
|
} else if let results = viewModel.results[viewModel.searchQuery] {
|
||||||
} else {
|
if results.isEmpty, !viewModel.isSearching {
|
||||||
EmptyView(iconName: "magnifyingglass",
|
EmptyView(iconName: "magnifyingglass",
|
||||||
title: "explore.search.empty.title",
|
title: "explore.search.empty.title",
|
||||||
message: "explore.search.empty.message")
|
message: "explore.search.empty.message")
|
||||||
.listRowBackground(theme.secondaryBackgroundColor)
|
.listRowBackground(theme.secondaryBackgroundColor)
|
||||||
.listRowSeparator(.hidden)
|
.listRowSeparator(.hidden)
|
||||||
|
} else {
|
||||||
|
makeSearchResultsView(results: results)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if viewModel.allSectionsEmpty {
|
} else if viewModel.allSectionsEmpty {
|
||||||
EmptyView(iconName: "magnifyingglass",
|
EmptyView(iconName: "magnifyingglass",
|
||||||
|
|
Loading…
Reference in New Issue