mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-26 08:54:07 +01:00
This commit is contained in:
parent
66ee7d4715
commit
0337d12bef
6 changed files with 20 additions and 14 deletions
|
|
@ -91,14 +91,14 @@ export const initFramework = () => {
|
|||
});
|
||||
initEditorName();
|
||||
if (getOpenNotebookCount() > 0) {
|
||||
const id = window.localStorage.getItem(Constants.LOCAL_DOC) || "";
|
||||
fetchPost("/api/block/checkBlockExist", {id}, existResponse => {
|
||||
const localDoc = JSON.parse(window.localStorage.getItem(Constants.LOCAL_DOCINFO) || '{"id": ""}');
|
||||
fetchPost("/api/block/checkBlockExist", {id: localDoc.id}, existResponse => {
|
||||
if (existResponse.data) {
|
||||
openMobileFileById(id);
|
||||
openMobileFileById(localDoc.id, localDoc.hasContext, localDoc.action);
|
||||
} else {
|
||||
fetchPost("/api/block/getRecentUpdatedBlocks", {}, (response) => {
|
||||
if (response.data.length !== 0) {
|
||||
openMobileFileById(response.data[0].id);
|
||||
openMobileFileById(response.data[0].id, true);
|
||||
} else {
|
||||
setEmpty();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue