Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/17150

Vanessa0157866ad7b1
diff --git a/app/src/plugin/platformUtils.ts b/app/src/plugin/platformUtils.ts
index a6c1a4791c..d18f408868 100644
--- a/app/src/plugin/platformUtils.ts
+++ b/app/src/plugin/platformUtils.ts
@@ -18,8 +18,8 @@ export const getLocalStorage = compatibility.getLocalStorage;
export const setStorageVal = compatibility.setStorageVal;
export const sendMobileAppNotification = (channel: string, title: string, body: string, delayInSeconds: number): Promise<number> => {
- /// #if BROWSER
return new Promise((resolve) => {
+ /// #if BROWSER
if (window.JSAndroid && window.JSAndroid.sendNotification) {
const id = window.JSAndroid.sendNotification(channel, title, body, delayInSeconds);
resolve(id);
@@ -45,8 +45,10 @@ export const sendMobileAppNotification = (channel: string, title: string, body:
} else {
resolve(-1);
}
+ /// #else
+ resolve(-1);
+ /// #endif
});
- /// #endif
};
export const cancelMobileAppNotification = (id: number) => {