Skip to content

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

:art: Improve editor font loading during mobile startup https://github.com/siyuan-note/siyuan/issues/19122

Danielb72e1f77de8b
diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts
index d4b832b026..864c391132 100644
--- a/app/src/mobile/util/initFramework.ts
+++ b/app/src/mobile/util/initFramework.ts
@@ -292,7 +292,7 @@ const initSidePanelTabs = (app: App, sidePanelElement: HTMLElement) => {
};
export const initFramework = async (app: App, isStart: boolean) => {
- setInlineStyle();
+ const inlineStyleReady = setInlineStyle();
const snippetReady = renderSnippet(Constants.TIMEOUT_SNIPPET_LOAD);
initKeyboardToolbar();
initMobileBottomBar(app);
@@ -319,7 +319,7 @@ export const initFramework = async (app: App, isStart: boolean) => {
renderMobileSidePanelLayout(app);
updateOpenSidePanelDocks(app, [sidebarElement, sidebarRightElement]);
});
- await snippetReady;
+ await Promise.all([inlineStyleReady, snippetReady]);
window.siyuan.mobile.docks.file = new MobileFiles(app, getDockContentElement("file"));
document.getElementById("toolbarFile").addEventListener("click", () => {
if (getCurrentEditor()?.protyle.toolbar.isMultiSelectMode()) {