Fixed #136
This commit is contained in:
@@ -372,12 +372,6 @@ export let settings = Object.assign({}, DEFAULT_SETTINGS) as OmnisearchSettings
|
||||
|
||||
export async function loadSettings(plugin: Plugin): Promise<void> {
|
||||
settings = Object.assign({}, DEFAULT_SETTINGS, await plugin.loadData())
|
||||
|
||||
if (Platform.isMobileApp) {
|
||||
settings.PDFIndexing = false
|
||||
settings.imagesIndexing = false
|
||||
}
|
||||
|
||||
showExcerpt.set(settings.showExcerpt)
|
||||
}
|
||||
|
||||
|
||||
@@ -208,8 +208,8 @@ export function getCtrlKeyLabel(): 'ctrl' | '⌘' {
|
||||
export function isFileIndexable(path: string): boolean {
|
||||
return (
|
||||
isFilePlaintext(path) ||
|
||||
(settings.PDFIndexing && isFilePDF(path)) ||
|
||||
(settings.imagesIndexing && isFileImage(path))
|
||||
(!Platform.isMobileApp && settings.PDFIndexing && isFilePDF(path)) ||
|
||||
(!Platform.isMobileApp && settings.imagesIndexing && isFileImage(path))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user