Plugins: Fix refreshable
Place refreshable in the individual lists instead of in the parent ZStack as that applies to sheets as well. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
29614bc0f8
commit
d5ba67503b
2 changed files with 4 additions and 3 deletions
|
|
@ -83,6 +83,10 @@ struct PluginAggregateView<P: Plugin, PJ: PluginJson>: View {
|
||||||
.onChange(of: searchText) { _ in
|
.onChange(of: searchText) { _ in
|
||||||
fetchPredicate()
|
fetchPredicate()
|
||||||
}
|
}
|
||||||
|
// Alternatively, place the sheet in the parent view
|
||||||
|
.refreshable {
|
||||||
|
await pluginManager.fetchPluginsFromUrl()
|
||||||
|
}
|
||||||
.sheet(isPresented: $showPluginOptions) {
|
.sheet(isPresented: $showPluginOptions) {
|
||||||
PluginInfoView(selectedPlugin: $selectedPlugin)
|
PluginInfoView(selectedPlugin: $selectedPlugin)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,6 @@ struct PluginsView: View {
|
||||||
.onDisappear {
|
.onDisappear {
|
||||||
checkedForPlugins = false
|
checkedForPlugins = false
|
||||||
}
|
}
|
||||||
.refreshable {
|
|
||||||
await pluginManager.fetchPluginsFromUrl()
|
|
||||||
}
|
|
||||||
.navigationTitle("Plugins")
|
.navigationTitle("Plugins")
|
||||||
.searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .always))
|
.searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .always))
|
||||||
.autocorrectionDisabled(!autocorrectSearch)
|
.autocorrectionDisabled(!autocorrectSearch)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue