Skip to content

Commit 971bea5

Browse files
committed
#188 - Group of changes addressing compatibility issued with Obsidian 1.7.2 and newer
1 parent fc6706d commit 971bea5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/settings.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export class CustomSortSettingTab extends PluginSettingTab {
6464
+ '<br>'
6565
+ 'For large vaults or on mobile the value might need to be increased if plugin constantly fails to auto-apply'
6666
+ ' custom ordering on start.'
67+
+ '<br>'
68+
+ `Min: ${DELAY_MIN_SECONDS} sec., max. ${DELAY_MAX_SECONDS} sec.`
6769
)
6870

6971
new Setting(containerEl)
@@ -73,7 +75,8 @@ export class CustomSortSettingTab extends PluginSettingTab {
7375
.setValue(`${this.plugin.settings.delayForInitialApplication/MILIS}`)
7476
.onChange(async (value) => {
7577
let delayS = parseInt(value, 10)
76-
delayS = Number.isNaN(delayS) ? DEFAULT_DELAY_SECONDS : (delayS < DELAY_MIN_SECONDS ? DELAY_MIN_SECONDS :(delayS > DELAY_MAX_SECONDS ? DELAY_MIN_SECONDS : delayS))
78+
delayS = Number.isNaN(delayS) ? DEFAULT_DELAY_SECONDS : (delayS < DELAY_MIN_SECONDS ? DELAY_MIN_SECONDS :(delayS > DELAY_MAX_SECONDS ? DELAY_MAX_SECONDS : delayS))
79+
delayS = Math.round(delayS)
7780
this.plugin.settings.delayForInitialApplication = delayS * MILIS
7881
await this.plugin.saveSettings()
7982
}))

0 commit comments

Comments
 (0)