Merge branch 'download-rework' into api-update

This commit is contained in:
VincentM
2023-12-10 10:56:04 +01:00
committed by GitHub
20 changed files with 1094 additions and 308 deletions

View File

@@ -94,7 +94,7 @@ struct MainView: View {
}
.task {
self.serverConnection = await viewModel.checkServerConnection()
await viewModel.loadCategoryList()
await viewModel.getCategories()//viewModel.loadCategoryList()
// Open detail view for default category
if userSettings.defaultCategory != "" {
if let cat = viewModel.categories.first(where: { c in
@@ -109,7 +109,7 @@ struct MainView: View {
}
.refreshable {
self.serverConnection = await viewModel.checkServerConnection()
await viewModel.loadCategoryList(needsUpdate: true)
await viewModel.getCategories()//loadCategoryList(needsUpdate: true)
}
}
@@ -212,7 +212,7 @@ struct RecipeSearchView: View {
.navigationTitle("Search recipe")
}
.task {
allRecipes = await viewModel.getAllRecipes()
allRecipes = await viewModel.getRecipes()//.getAllRecipes()
}
}