Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 authored and tom2319273 committed Aug 3, 2024
1 parent 2b327e9 commit 323dec2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions app/src/mobile/util/onMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ 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) {
switch (data.cmd) {
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;
Expand Down
5 changes: 5 additions & 0 deletions app/src/window/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 323dec2

Please sign in to comment.