Fixed: edited recipes were not saved locally

This commit is contained in:
VincentMeilinger
2024-03-08 17:45:26 +01:00
parent dbe626d595
commit 29872611da
3 changed files with 8 additions and 1 deletions

View File

@@ -406,6 +406,9 @@ struct RecipeViewToolBar: ToolbarContent {
}
await appState.getCategories()
await appState.getCategory(named: viewModel.observableRecipeDetail.recipeCategory, fetchMode: .preferServer)
if let id = Int(viewModel.observableRecipeDetail.id) {
await appState.getRecipe(id: id, fetchMode: .onlyServer, save: true)
}
viewModel.editMode = false
}