Vanessa 2024-09-15 11:13:49 +08:00
parent caa2f1311f
commit 9f62738fa4
9 changed files with 14 additions and 14 deletions

View file

@ -174,7 +174,7 @@ export const initFramework = (app: App, isStart: boolean) => {
const idZoomIn = getIdZoomInByPath();
if (idZoomIn.id) {
openMobileFileById(app, idZoomIn.id,
idZoomIn.isZoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
idZoomIn.isZoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
return;
}
if (window.siyuan.config.fileTree.closeTabsOnStart && isStart) {
@ -184,12 +184,12 @@ export const initFramework = (app: App, isStart: boolean) => {
const localDoc = window.siyuan.storage[Constants.LOCAL_DOCINFO];
fetchPost("/api/block/checkBlockExist", {id: localDoc.id}, existResponse => {
if (existResponse.data) {
openMobileFileById(app, localDoc.id, [Constants.CB_GET_SCROLL, Constants.CB_GET_HL]);
openMobileFileById(app, localDoc.id, [Constants.CB_GET_SCROLL]);
} else {
fetchPost("/api/block/getRecentUpdatedBlocks", {}, (response) => {
if (response.data.length !== 0) {
checkFold(response.data[0].id, (zoomIn) => {
openMobileFileById(app, response.data[0].id, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
openMobileFileById(app, response.data[0].id, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
});
} else {
setEmpty(app);