Vanessa 2024-04-18 10:44:46 +08:00
parent 1e12bfeadd
commit a53079d2b5
3 changed files with 14 additions and 1 deletions

View file

@ -22,6 +22,10 @@ export const getCurrentEditor = () => {
export const openMobileFileById = (app: App, id: string, action = [Constants.CB_GET_HL]) => {
window.siyuan.storage[Constants.LOCAL_DOCINFO] = {id};
setStorageVal(Constants.LOCAL_DOCINFO, window.siyuan.storage[Constants.LOCAL_DOCINFO]);
const avPanelElement = document.querySelector(".av__panel");
if (avPanelElement && !avPanelElement.classList.contains("fn__none")) {
avPanelElement.dispatchEvent(new CustomEvent("click", {detail: "close"}));
}
if (window.siyuan.mobile.editor) {
saveScroll(window.siyuan.mobile.editor.protyle);
hideElements(["toolbar", "hint", "util"], window.siyuan.mobile.editor.protyle);