diff --git a/frontend/src/stores/main.ts b/frontend/src/stores/main.ts index f3a67c4..abd0765 100644 --- a/frontend/src/stores/main.ts +++ b/frontend/src/stores/main.ts @@ -79,6 +79,7 @@ export const useMainStore = defineStore('main', { connected: false, authInProgress: false, cursor: '' as string, + lastSearchLoc: '' as string, server: {} as Record & { public?: boolean paskia?: boolean @@ -159,6 +160,10 @@ export const useMainStore = defineStore('main', { this.docVersion++ // Sync documents to search worker this.syncSearchWorker() + // Re-run the current search against the updated file list + if (this.query) { + this.search(this.query, this.lastSearchLoc) + } }, /** Patch aspect ratios on existing docs from a server ar update message */ updateAr(arMap: Record) { @@ -268,6 +273,7 @@ export const useMainStore = defineStore('main', { // Update query immediately so watchers know we're handling this this.query = query + this.lastSearchLoc = loc // Cancel pending timers if (loadingTimer) {