Plugins/Library: Add refreshable

Allow using pull to refresh for fetching plugins and information from
debrid cloud.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2023-04-02 15:14:42 -04:00
parent d918039810
commit b2616bdeb7
2 changed files with 6 additions and 0 deletions

View file

@ -29,6 +29,9 @@ struct DebridCloudView: View {
.task {
await debridManager.fetchDebridCloud()
}
.refreshable {
await debridManager.fetchDebridCloud()
}
.onChange(of: debridManager.selectedDebridType) { newType in
if newType != nil {
Task {

View file

@ -73,6 +73,9 @@ struct PluginsView: View {
.onDisappear {
checkedForPlugins = false
}
.refreshable {
await pluginManager.fetchPluginsFromUrl()
}
.navigationTitle("Plugins")
.searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .always))
.autocorrectionDisabled(!autocorrectSearch)