Remove toast notification for silent auto-indexing
Replace `loadVaults()` and `loadTags()` calls with state-preserving sidebar and tag refresh functions after silent indexing
This commit is contained in:
+2
-2
@@ -5718,13 +5718,13 @@
|
|||||||
|
|
||||||
const n = data.total_changes || 0;
|
const n = data.total_changes || 0;
|
||||||
const vaults = (data.vaults || []).join(", ");
|
const vaults = (data.vaults || []).join(", ");
|
||||||
showToast(`${n} fichier(s) mis à jour (${vaults})`, "info");
|
// Toast removed: silent auto-indexing — no notification needed
|
||||||
|
|
||||||
// Refresh sidebar and tags if affected vault matches current context
|
// Refresh sidebar and tags if affected vault matches current context
|
||||||
const affectsCurrentVault = selectedContextVault === "all" || (data.vaults || []).includes(selectedContextVault);
|
const affectsCurrentVault = selectedContextVault === "all" || (data.vaults || []).includes(selectedContextVault);
|
||||||
if (affectsCurrentVault) {
|
if (affectsCurrentVault) {
|
||||||
try {
|
try {
|
||||||
await Promise.all([loadVaults(), loadTags()]);
|
await Promise.all([refreshSidebarTreePreservingState(), refreshTagsForContext()]);
|
||||||
// Refresh current file if it was updated
|
// Refresh current file if it was updated
|
||||||
if (currentVault && currentPath) {
|
if (currentVault && currentPath) {
|
||||||
const changed = (data.changes || []).some((c) => c.vault === currentVault && c.path === currentPath);
|
const changed = (data.changes || []).some((c) => c.vault === currentVault && c.path === currentPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user