From 9555aa099c6a54918759f270557435703e15f92e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 18 Jun 2024 22:34:50 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/11749 --- app/src/index.ts | 5 +++++ app/src/mobile/util/onMessage.ts | 6 ++++++ app/src/window/index.ts | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/app/src/index.ts b/app/src/index.ts index 4e2b2f32488..6e13ded84c2 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -63,6 +63,11 @@ export class App { case "reloadPlugin": reloadPlugin(this, data.data); break; + case "reloadEmojiConf": + fetchPost("/api/system/getEmojiConf", {}, response => { + window.siyuan.emojis = response.data as IEmoji[]; + }); + break; case "syncMergeResult": reloadSync(this, data.data); break; diff --git a/app/src/mobile/util/onMessage.ts b/app/src/mobile/util/onMessage.ts index 13a49eec571..60a58564a99 100644 --- a/app/src/mobile/util/onMessage.ts +++ b/app/src/mobile/util/onMessage.ts @@ -3,6 +3,7 @@ import {processSync, progressLoading, progressStatus, reloadSync, transactionErr import {Constants} from "../../constants"; import {App} from "../../index"; import {reloadPlugin} from "../../plugin/loader"; +import {fetchPost} from "../../util/fetch"; export const onMessage = (app: App, data: IWebSocketData) => { if (data) { @@ -10,6 +11,11 @@ export const onMessage = (app: App, data: IWebSocketData) => { case "reloadPlugin": reloadPlugin(app, data.data); break; + case "reloadEmojiConf": + fetchPost("/api/system/getEmojiConf", {}, response => { + window.siyuan.emojis = response.data as IEmoji[]; + }); + break; case "syncMergeResult": reloadSync(app, data.data); break; diff --git a/app/src/window/index.ts b/app/src/window/index.ts index b6b978cf81a..c73f24ba8ce 100644 --- a/app/src/window/index.ts +++ b/app/src/window/index.ts @@ -54,6 +54,11 @@ class App { case "reloadPlugin": reloadPlugin(this, data.data); break; + case "reloadEmojiConf": + fetchPost("/api/system/getEmojiConf", {}, response => { + window.siyuan.emojis = response.data as IEmoji[]; + }); + break; case "syncMergeResult": reloadSync(this, data.data); break;