From 82fe4c7eb8886aff6be3b9f5d14930c31a4cfcdb Mon Sep 17 00:00:00 2001 From: Simon Cambier Date: Sat, 18 May 2024 08:52:39 +0200 Subject: [PATCH] Disable url tokenization on iOS --- src/settings.ts | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/settings.ts b/src/settings.ts index 5e7b648..1186fb1 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -325,18 +325,21 @@ export class SettingsTab extends PluginSettingTab { ) // Extract URLs - new Setting(containerEl) - .setName('Tokenize URLs') - .setDesc( - `Enable this if you want to be able to search for URLs as separate words. + // Crashes on iOS + if (!Platform.isIosApp) { + new Setting(containerEl) + .setName('Tokenize URLs') + .setDesc( + `Enable this if you want to be able to search for URLs as separate words. This setting has a strong impact on indexing performance, and can crash Obsidian under certain conditions.` - ) - .addToggle(toggle => - toggle.setValue(settings.tokenizeUrls).onChange(async v => { - settings.tokenizeUrls = v - await saveSettings(this.plugin) - }) - ) + ) + .addToggle(toggle => + toggle.setValue(settings.tokenizeUrls).onChange(async v => { + settings.tokenizeUrls = v + await saveSettings(this.plugin) + }) + ) + } // Open in new pane new Setting(containerEl) @@ -717,7 +720,7 @@ export const DEFAULT_SETTINGS: OmnisearchSettings = { PDFIndexing: false, officeIndexing: false, imagesIndexing: false, - unsupportedFilesIndexing: 'no', + unsupportedFilesIndexing: 'default', splitCamelCase: false, openInNewPane: false, vimLikeNavigationShortcut: app.vault.getConfig('vimMode') as boolean,