Disabling PDF indexing on mobile to avoid a crash
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
import { Plugin, PluginSettingTab, Setting, SliderComponent } from 'obsidian'
|
||||
import {
|
||||
Platform,
|
||||
Plugin,
|
||||
PluginSettingTab,
|
||||
Setting,
|
||||
SliderComponent,
|
||||
} from 'obsidian'
|
||||
import { writable } from 'svelte/store'
|
||||
import { notesCacheFilePath, minisearchCacheFilePath } from './globals'
|
||||
import type OmnisearchPlugin from './main'
|
||||
@@ -167,7 +173,8 @@ export class SettingsTab extends PluginSettingTab {
|
||||
})
|
||||
)
|
||||
|
||||
// PDF Indexing
|
||||
// PDF Indexing - not available on mobile
|
||||
if (!Platform.isMobileApp) {
|
||||
const indexPDFsDesc = new DocumentFragment()
|
||||
indexPDFsDesc.createSpan({}, span => {
|
||||
span.innerHTML = `Omnisearch will include PDFs in search results.
|
||||
@@ -184,7 +191,7 @@ export class SettingsTab extends PluginSettingTab {
|
||||
await saveSettings(this.plugin)
|
||||
})
|
||||
)
|
||||
|
||||
}
|
||||
// #endregion Behavior
|
||||
|
||||
// #region User Interface
|
||||
@@ -330,7 +337,9 @@ export const DEFAULT_SETTINGS: OmnisearchSettings = {
|
||||
ignoreDiacritics: true,
|
||||
indexedFileTypes: [] as string[],
|
||||
PDFIndexing: false,
|
||||
backgroundProcesses: Math.max(1, Math.floor(require('os').cpus().length / 2)),
|
||||
backgroundProcesses: Platform.isMobileApp
|
||||
? 0
|
||||
: Math.max(1, Math.floor(require('os').cpus().length / 2)),
|
||||
|
||||
showIndexingNotices: false,
|
||||
showShortName: false,
|
||||
|
||||
Reference in New Issue
Block a user