feat: rebuild search index
This commit is contained in:
@@ -302,6 +302,13 @@ const App: React.FC = () => {
|
||||
}) || (() => {})
|
||||
);
|
||||
|
||||
unsubscribers.push(
|
||||
window.electronAPI?.on('menu:reindexText', () => {
|
||||
// Fire and forget - runs as a background task
|
||||
window.electronAPI?.posts.reindexText();
|
||||
}) || (() => {})
|
||||
);
|
||||
|
||||
return () => {
|
||||
unsubscribers.forEach(unsub => unsub());
|
||||
};
|
||||
|
||||
1
src/renderer/types/electron.d.ts
vendored
1
src/renderer/types/electron.d.ts
vendored
@@ -149,6 +149,7 @@ export interface ElectronAPI {
|
||||
discard: (id: string) => Promise<PostData | null>;
|
||||
hasPublishedVersion: (id: string) => Promise<boolean>;
|
||||
rebuildFromFiles: () => Promise<void>;
|
||||
reindexText: () => Promise<void>;
|
||||
search: (query: string) => Promise<SearchResult[]>;
|
||||
filter: (filter: PostFilter) => Promise<PostData[]>;
|
||||
getTags: () => Promise<string[]>;
|
||||
|
||||
Reference in New Issue
Block a user