#120 - Disabling PDF Indexing on iOS
This commit is contained in:
@@ -143,7 +143,8 @@ export class SettingsTab extends PluginSettingTab {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
// PDF Indexing
|
// PDF Indexing - disabled on iOS
|
||||||
|
if (!Platform.isIosApp) {
|
||||||
const indexPDFsDesc = new DocumentFragment()
|
const indexPDFsDesc = new DocumentFragment()
|
||||||
indexPDFsDesc.createSpan({}, span => {
|
indexPDFsDesc.createSpan({}, span => {
|
||||||
span.innerHTML = `Omnisearch will include PDFs in search results.
|
span.innerHTML = `Omnisearch will include PDFs in search results.
|
||||||
@@ -164,6 +165,7 @@ export class SettingsTab extends PluginSettingTab {
|
|||||||
await saveSettings(this.plugin)
|
await saveSettings(this.plugin)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
}
|
||||||
// #endregion Behavior
|
// #endregion Behavior
|
||||||
|
|
||||||
// #region User Interface
|
// #region User Interface
|
||||||
@@ -324,6 +326,12 @@ export let settings = Object.assign({}, DEFAULT_SETTINGS) as OmnisearchSettings
|
|||||||
|
|
||||||
export async function loadSettings(plugin: Plugin): Promise<void> {
|
export async function loadSettings(plugin: Plugin): Promise<void> {
|
||||||
settings = Object.assign({}, DEFAULT_SETTINGS, await plugin.loadData())
|
settings = Object.assign({}, DEFAULT_SETTINGS, await plugin.loadData())
|
||||||
|
|
||||||
|
// Make sure that PDF indexing is disabled on iOS
|
||||||
|
if (Platform.isIosApp) {
|
||||||
|
settings.PDFIndexing = false
|
||||||
|
}
|
||||||
|
|
||||||
showExcerpt.set(settings.showExcerpt)
|
showExcerpt.set(settings.showExcerpt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user