From 6a3095c56cd648475a588b1e30b6b0adccc758c6 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 29 Aug 2024 16:53:02 +0800 Subject: [PATCH] :art: No longer limits the number of dynamically loaded blocks in the editor https://github.com/siyuan-note/siyuan/issues/12359 --- app/src/config/editor.ts | 6 +----- app/src/mobile/settings/editor.ts | 2 +- kernel/conf/editor.go | 1 - kernel/model/conf.go | 3 --- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/src/config/editor.ts b/app/src/config/editor.ts index 851b2c65e..64543078e 100644 --- a/app/src/config/editor.ts +++ b/app/src/config/editor.ts @@ -165,7 +165,7 @@ export const editor = {
${window.siyuan.languages.dynamicLoadBlocksTip}
- +
@@ -328,10 +328,6 @@ export const editor = { dynamicLoadBlocks = 48; (editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value = "48"; } - if (1024 < dynamicLoadBlocks) { - dynamicLoadBlocks = 1024; - (editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value = "1024"; - } fetchPost("/api/setting/setEditor", { fullWidth: (editor.element.querySelector("#fullWidth") as HTMLInputElement).checked, diff --git a/app/src/mobile/settings/editor.ts b/app/src/mobile/settings/editor.ts index 66f88b761..6e6506d58 100644 --- a/app/src/mobile/settings/editor.ts +++ b/app/src/mobile/settings/editor.ts @@ -195,7 +195,7 @@ export const initEditor = () => {
${window.siyuan.languages.dynamicLoadBlocks} - +
${window.siyuan.languages.dynamicLoadBlocksTip}
diff --git a/kernel/conf/editor.go b/kernel/conf/editor.go index d94d72915..71a567966 100644 --- a/kernel/conf/editor.go +++ b/kernel/conf/editor.go @@ -56,7 +56,6 @@ type Editor struct { const ( MinDynamicLoadBlocks = 48 - MaxDynamicLoadBlocks = 1024 ) func NewEditor() *Editor { diff --git a/kernel/model/conf.go b/kernel/model/conf.go index e4e101501..bc6286db2 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -247,9 +247,6 @@ func InitConf() { if conf.MinDynamicLoadBlocks > Conf.Editor.DynamicLoadBlocks { Conf.Editor.DynamicLoadBlocks = conf.MinDynamicLoadBlocks } - if conf.MaxDynamicLoadBlocks < Conf.Editor.DynamicLoadBlocks { - Conf.Editor.DynamicLoadBlocks = conf.MaxDynamicLoadBlocks - } if 0 > Conf.Editor.BacklinkExpandCount { Conf.Editor.BacklinkExpandCount = 0 }