mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -499,6 +499,10 @@ export class MobileFiles extends Model {
|
||||
} else {
|
||||
targetElement.remove();
|
||||
}
|
||||
|
||||
if (window.siyuan.mobileEditor && window.siyuan.mobileEditor.protyle.path === data.data.path) {
|
||||
setEmpty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import {fetchPost} from "./fetch";
|
||||
import {getDisplayName, getOpenNotebookCount, pathPosix} from "./pathName";
|
||||
import {openFileById} from "../editor/util";
|
||||
import {Constants} from "../constants";
|
||||
import {isMobile} from "./functions";
|
||||
import {openMobileFileById} from "../mobile/editor";
|
||||
|
||||
export const newFile = (notebookId?: string, currentPath?: string, open?: boolean) => {
|
||||
if (getOpenNotebookCount() === 0) {
|
||||
@@ -57,7 +59,11 @@ export const newFile = (notebookId?: string, currentPath?: string, open?: boolea
|
||||
md: "",
|
||||
}, () => {
|
||||
if (open) {
|
||||
openFileById({id, hasContext: true, action: [Constants.CB_GET_HL]});
|
||||
if (isMobile()) {
|
||||
openMobileFileById(id, true);
|
||||
} else {
|
||||
openFileById({id, hasContext: true, action: [Constants.CB_GET_HL]});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user