From 971bea5792c614e864a4447002e8d04e96d58113 Mon Sep 17 00:00:00 2001 From: SebastianMC <23032356+SebastianMC@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:39:07 +0100 Subject: [PATCH] #188 - Group of changes addressing compatibility issued with Obsidian 1.7.2 and newer --- src/settings.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/settings.ts b/src/settings.ts index 35348c5..8e13d7c 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -64,6 +64,8 @@ export class CustomSortSettingTab extends PluginSettingTab { + '
' + 'For large vaults or on mobile the value might need to be increased if plugin constantly fails to auto-apply' + ' custom ordering on start.' + + '
' + + `Min: ${DELAY_MIN_SECONDS} sec., max. ${DELAY_MAX_SECONDS} sec.` ) new Setting(containerEl) @@ -73,7 +75,8 @@ export class CustomSortSettingTab extends PluginSettingTab { .setValue(`${this.plugin.settings.delayForInitialApplication/MILIS}`) .onChange(async (value) => { let delayS = parseInt(value, 10) - delayS = Number.isNaN(delayS) ? DEFAULT_DELAY_SECONDS : (delayS < DELAY_MIN_SECONDS ? DELAY_MIN_SECONDS :(delayS > DELAY_MAX_SECONDS ? DELAY_MIN_SECONDS : delayS)) + delayS = Number.isNaN(delayS) ? DEFAULT_DELAY_SECONDS : (delayS < DELAY_MIN_SECONDS ? DELAY_MIN_SECONDS :(delayS > DELAY_MAX_SECONDS ? DELAY_MAX_SECONDS : delayS)) + delayS = Math.round(delayS) this.plugin.settings.delayForInitialApplication = delayS * MILIS await this.plugin.saveSettings() }))