fix: loadSavedSearches() après sauvegarde — màj immédiate sans refresh
All checks were successful
CI / lint (push) Successful in 13s
CI / security (push) Successful in 8s
CI / test (push) Successful in 16s
CI / build (push) Successful in 1s

This commit is contained in:
Bruno Charest 2026-05-29 22:03:16 -04:00
parent 146e431f55
commit 5a76a48e28
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@
import { api } from './auth.js';
import { state } from './state.js';
import { safeCreateIcons } from './utils.js';
import { showLoading, el, hideProgressBar, showWelcome, highlightSearchText } from './viewer.js';
import { showLoading, el, hideProgressBar, showWelcome, highlightSearchText, loadSavedSearches } from './viewer.js';
import { _getEffective } from './config.js';
import { TabManager, showToast } from './ui.js';
import { addTagFilter, buildSearchResultsHeader, shouldDisplayPath, removeTagFilter, TagFilterService } from './sidebar.js';
@ -932,6 +932,7 @@ export function renderAdvancedSearchResults(data, query, tagFilter) {
}),
});
showToast("Recherche sauvegardée", "success");
loadSavedSearches();
} catch (err) { showToast("Erreur: " + err.message, "error"); }
});
header.appendChild(saveBtn);

View File

@ -978,7 +978,7 @@ export function showWelcome() {
loadSavedSearches();
}
async function loadSavedSearches() {
export async function loadSavedSearches() {
const list = document.getElementById("saved-searches-list");
const empty = document.getElementById("saved-searches-empty");
if (!list) return;