From 3edd8230d33e351ee075a9ff12065546b8827d2d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 14 May 2023 10:34:48 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/8216 --- app/src/protyle/index.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts index b18eee06e..8563299f2 100644 --- a/app/src/protyle/index.ts +++ b/app/src/protyle/index.ts @@ -2,7 +2,7 @@ import {Constants} from "../constants"; import {Hint} from "./hint"; import {setLute} from "./markdown/setLute"; import {Preview} from "./preview"; -import {initUI, removeLoading, setPadding} from "./ui/initUI"; +import {addLoading, initUI, removeLoading, setPadding} from "./ui/initUI"; import {Undo} from "./undo"; import {Upload} from "./upload"; import {Options} from "./util/Options"; @@ -89,6 +89,16 @@ export class Protyle { type: "protyle", msgCallback: (data) => { switch (data.cmd) { + case "reload": + if (data.data === this.protyle.block.rootID) { + reloadProtyle(this.protyle, false); + } + break; + case "addLoadding": + if (data.data === this.protyle.block.rootID) { + addLoading(this.protyle); + } + break; case "transactions": data.data[0].doOperations.forEach((item: IOperation) => { onTransaction(this.protyle, item, false);