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/pull/16465

Vanessa70c5e267fbe2
diff --git a/app/src/editor/openLink.ts b/app/src/editor/openLink.ts
index 6f36f0e88e..38dbd01f67 100644
--- a/app/src/editor/openLink.ts
+++ b/app/src/editor/openLink.ts
@@ -3,12 +3,12 @@ import {getIdFromSYProtocol, isLocalPath, isSYProtocol, pathPosix} from "../util
import {shell, ipcRenderer} from "electron";
/// #endif
import {getSearch} from "../util/functions";
-import {openByMobile} from "../protyle/util/compatibility";
import {Constants} from "../constants";
-import {showMessage} from "../dialog/message";
/// #if !MOBILE
import {openAsset, openBy, openFile, openFileById} from "./util";
/// #endif
+import {showMessage} from "../dialog/message";
+import {openByMobile} from "../protyle/util/compatibility";
import {App} from "../index";
import {fetchPost} from "../util/fetch";
import {checkFold} from "../util/noRelyPCFunction";
diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.ts
index 9b6879d754..c790f992a9 100644
--- a/app/src/protyle/util/compatibility.ts
+++ b/app/src/protyle/util/compatibility.ts
@@ -3,6 +3,8 @@ import {fetchPost, fetchSyncPost} from "../../util/fetch";
import {Constants} from "../../constants";
/// #if !BROWSER
import {clipboard, ipcRenderer} from "electron";
+/// #endif
+/// #if MOBILE
import {processSYLink} from "../../editor/openLink";
/// #endif
@@ -54,10 +56,11 @@ export const openByMobile = (uri: string) => {
if (!uri) {
return;
}
- //https://github.com/siyuan-note/siyuan/issues/15892
+ /// #if MOBILE
if (processSYLink(window.siyuan.ws.app, uri)) {
return;
}
+ /// #endif
if (isInIOS()) {
if (uri.startsWith("assets/")) {
// iOS 16.7 之前的版本,uri 需要 encodeURIComponent
@@ -564,3 +567,4 @@ export const initFocusFix = () => {
};
};
/// #endif
+