feat: update preview URL handling in RecipeRoutes and optimize recipe refresh logic in RecipeModal. Fixes #244

This commit is contained in:
Will Miao
2025-06-23 15:29:22 +08:00
parent e726c4f442
commit f6ef428008
2 changed files with 5 additions and 8 deletions

View File

@@ -989,13 +989,10 @@ class RecipeModal {
setTimeout(() => {
this.showRecipeDetails(this.currentRecipe);
}, 500);
// Refresh recipes list
if (window.recipeManager && typeof window.recipeManager.loadRecipes === 'function') {
setTimeout(() => {
window.recipeManager.loadRecipes(true);
}, 1000);
}
state.virtualScroller.updateSingleItem(this.currentRecipe.file_path, {
loras: this.currentRecipe.loras
});
} else {
showToast(`Error: ${result.error}`, 'error');
}