Renamed "reindexNotes" into "refreshIndex"
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
import { Query } from 'src/query'
|
import { Query } from 'src/query'
|
||||||
import { saveSearchHistory, searchHistory } from 'src/search-history'
|
import { saveSearchHistory, searchHistory } from 'src/search-history'
|
||||||
import { settings } from '../settings'
|
import { settings } from '../settings'
|
||||||
import { reindexNotes } from '../notes-index'
|
import { refreshIndex } from '../notes-index'
|
||||||
|
|
||||||
export let modal: OmnisearchVaultModal
|
export let modal: OmnisearchVaultModal
|
||||||
let selectedIndex = 0
|
let selectedIndex = 0
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await reindexNotes()
|
await refreshIndex()
|
||||||
searchQuery = searchHistory[historySearchIndex]
|
searchQuery = searchHistory[historySearchIndex]
|
||||||
eventBus.enable('vault')
|
eventBus.enable('vault')
|
||||||
eventBus.on('vault', 'enter', openNoteAndCloseModal)
|
eventBus.on('vault', 'enter', openNoteAndCloseModal)
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export function addNoteToReindex(note: TAbstractFile): void {
|
|||||||
notesToReindex.add(note)
|
notesToReindex.add(note)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function reindexNotes(): Promise<void> {
|
export async function refreshIndex(): Promise<void> {
|
||||||
if (settings.showIndexingNotices && notesToReindex.size > 0) {
|
if (settings.showIndexingNotices && notesToReindex.size > 0) {
|
||||||
new Notice(`Omnisearch - Reindexing ${notesToReindex.size} notes`, 2000)
|
new Notice(`Omnisearch - Reindexing ${notesToReindex.size} notes`, 2000)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user