Skip to content

Commit

Permalink
🐛 Android 端资源文件 打开 - 在浏览器中查看 卡住 Fix #5495
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jul 25, 2022
1 parent 763a6a9 commit 4d48e8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/menus/commonMenuItem.ts
Expand Up @@ -774,6 +774,8 @@ export const openMenu = (src: string, onlyMenu = false) => {
click: () => {
if (window.siyuan.config.system.container === "ios") {
window.location.href = src;
} else if (window.siyuan.config.system.container === "android" && window.JSAndroid) {
window.JSAndroid.openExternal(src);
} else {
window.open(src);
}
Expand Down
4 changes: 4 additions & 0 deletions app/src/protyle/wysiwyg/index.ts
Expand Up @@ -1473,6 +1473,8 @@ export class WYSIWYG {
/// #else
if (window.siyuan.config.system.container === "ios") {
window.location.href = linkAddress;
} else if (window.siyuan.config.system.container === "android" && window.JSAndroid) {
window.JSAndroid.openExternal(linkAddress);
} else {
window.open(linkAddress);
}
Expand All @@ -1486,6 +1488,8 @@ export class WYSIWYG {
/// #else
if (window.siyuan.config.system.container === "ios") {
window.location.href = linkAddress;
} else if (window.siyuan.config.system.container === "android" && window.JSAndroid) {
window.JSAndroid.openExternal(linkAddress);
} else {
window.open(linkAddress);
}
Expand Down

0 comments on commit 4d48e8c

Please sign in to comment.