This commit is contained in:
Vanessa 2023-01-22 12:21:20 +08:00
parent 7e753908b8
commit bfcdf3c352
5 changed files with 85 additions and 44 deletions

View file

@ -137,11 +137,13 @@ export const initFramework = () => {
syncGuide();
});
if (getOpenNotebookCount() > 0) {
const openURL = window.JSAndroid.getBlockURL();
if (openURL && !/^siyuan:\/\/blocks\/\d{14}-\w{7}/.test(openURL)) {
openMobileFileById(openURL.substr(16, 22),
getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT]);
return;
if (window.JSAndroid) {
const openURL = window.JSAndroid.getBlockURL();
if (openURL && !/^siyuan:\/\/blocks\/\d{14}-\w{7}/.test(openURL)) {
openMobileFileById(openURL.substr(16, 22),
getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT]);
return;
}
}
const openId = getSearch("id");
if (openId) {