Better API call handling.

This commit is contained in:
Vicnet
2023-11-17 12:47:21 +01:00
parent 23e1a665df
commit 5e4b87b201
9 changed files with 286 additions and 346 deletions

View File

@@ -90,7 +90,7 @@ struct MainView: View {
}
.task {
self.serverConnection = await viewModel.checkServerConnection()
await viewModel.loadCategories()//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
@@ -105,7 +105,7 @@ struct MainView: View {
}
.refreshable {
self.serverConnection = await viewModel.checkServerConnection()
await viewModel.loadCategories()//loadCategoryList(needsUpdate: true)
await viewModel.getCategories()//loadCategoryList(needsUpdate: true)
}
}