File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ final class SearchViewModel: Store {
107107 cancelDebounce ( )
108108 state. webPages = [ ]
109109 state. todos = [ ]
110+ state. isLoading = false
110111 } else {
111112 state. isLoading = true
112113 scheduleDebouncedQuery ( query)
Original file line number Diff line number Diff line change @@ -61,16 +61,16 @@ struct SearchView: View {
6161 @ViewBuilder
6262 private var searchableContent : some View {
6363 Group {
64- if viewModel. state. isLoading {
65- LoadingView ( )
66- } else if viewModel. state. searchQuery. isEmpty {
64+ if viewModel. state. searchQuery. isEmpty {
6765 if viewModel. state. recentQueries. isEmpty {
6866 searchInstruction
6967 } else {
7068 ScrollView {
7169 recentQueries
7270 }
7371 }
72+ } else if viewModel. state. isLoading {
73+ LoadingView ( )
7474 } else if viewModel. state. webPages. isEmpty && viewModel. state. todos. isEmpty {
7575 emptySearchResult
7676 } else {
You can’t perform that action at this time.
0 commit comments