Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Dismiss editor font size notifications on reset https://github.com/siyuan-note/siyuan/issues/18322

Vanessab15b1bf23bea
diff --git a/app/src/util/editorFontSize.ts b/app/src/util/editorFontSize.ts
index 08202067f4..8febf5cba6 100644
--- a/app/src/util/editorFontSize.ts
+++ b/app/src/util/editorFontSize.ts
@@ -79,7 +79,11 @@ export const setEditorFontSize = (fontSize: number, options: IEditorFontSizeOpti
return nextFontSize;
};
-export const adjustEditorFontSize = (action: TEditorFontSizeAction, options: IEditorFontSizeOptions = {}) =>
- setEditorFontSize(resolveEditorFontSize(window.siyuan.config.editor.fontSize, action), {
- notify: options.notify ?? true,
+export const adjustEditorFontSize = (action: TEditorFontSizeAction, options: IEditorFontSizeOptions = {}) => {
+ if (action === "reset") {
+ hideMessage(MESSAGE_ID);
+ }
+ return setEditorFontSize(resolveEditorFontSize(window.siyuan.config.editor.fontSize, action), {
+ notify: action !== "reset" && (options.notify ?? true),
});
+};