mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-06-07 14:28:50 +00:00
Fix explore view loading state Fix #1395
This commit is contained in:
parent
67d1dede04
commit
58debff490
1 changed files with 10 additions and 10 deletions
|
@ -21,16 +21,7 @@ public struct ExploreView: View {
|
||||||
if !viewModel.isLoaded {
|
if !viewModel.isLoaded {
|
||||||
loadingView
|
loadingView
|
||||||
} else if !viewModel.searchQuery.isEmpty {
|
} else if !viewModel.searchQuery.isEmpty {
|
||||||
if viewModel.isSearching {
|
if let results = viewModel.results[viewModel.searchQuery] {
|
||||||
HStack {
|
|
||||||
Spacer()
|
|
||||||
ProgressView()
|
|
||||||
Spacer()
|
|
||||||
}
|
|
||||||
.listRowBackground(theme.secondaryBackgroundColor)
|
|
||||||
.listRowSeparator(.hidden)
|
|
||||||
.id(UUID())
|
|
||||||
} else if let results = viewModel.results[viewModel.searchQuery] {
|
|
||||||
if results.isEmpty, !viewModel.isSearching {
|
if results.isEmpty, !viewModel.isSearching {
|
||||||
EmptyView(iconName: "magnifyingglass",
|
EmptyView(iconName: "magnifyingglass",
|
||||||
title: "explore.search.empty.title",
|
title: "explore.search.empty.title",
|
||||||
|
@ -40,6 +31,15 @@ public struct ExploreView: View {
|
||||||
} else {
|
} else {
|
||||||
makeSearchResultsView(results: results)
|
makeSearchResultsView(results: results)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
ProgressView()
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
|
.listRowBackground(theme.secondaryBackgroundColor)
|
||||||
|
.listRowSeparator(.hidden)
|
||||||
|
.id(UUID())
|
||||||
}
|
}
|
||||||
} else if viewModel.allSectionsEmpty {
|
} else if viewModel.allSectionsEmpty {
|
||||||
EmptyView(iconName: "magnifyingglass",
|
EmptyView(iconName: "magnifyingglass",
|
||||||
|
|
Loading…
Reference in a new issue