Vanessa 2023-06-01 14:56:21 +08:00
parent 8c35440a77
commit 74b4a00a2f
42 changed files with 426 additions and 270 deletions

View file

@ -37,7 +37,7 @@ export const reloadSync = (app: App, data: { upsertRootIDs: string[], removeRoot
if (data.removeRootIDs.includes(window.siyuan.mobile.popEditor.protyle.block.rootID)) {
hideElements(["dialog"]);
} else {
reloadProtyle(window.siyuan.mobile.popEditor.protyle, false);
reloadProtyle(window.siyuan.mobile.popEditor.protyle, app, false);
window.siyuan.mobile.popEditor.protyle.breadcrumb.render(window.siyuan.mobile.popEditor.protyle, true);
}
}
@ -45,7 +45,7 @@ export const reloadSync = (app: App, data: { upsertRootIDs: string[], removeRoot
if (data.removeRootIDs.includes(window.siyuan.mobile.editor.protyle.block.rootID)) {
setEmpty(app);
} else {
reloadProtyle(window.siyuan.mobile.editor.protyle, false);
reloadProtyle(window.siyuan.mobile.editor.protyle, app, false);
fetchPost("/api/block/getDocInfo", {
id: window.siyuan.mobile.editor.protyle.block.rootID
}, (response) => {
@ -60,7 +60,7 @@ export const reloadSync = (app: App, data: { upsertRootIDs: string[], removeRoot
const allModels = getAllModels();
allModels.editor.forEach(item => {
if (data.upsertRootIDs.includes(item.editor.protyle.block.rootID)) {
reloadProtyle(item.editor.protyle, false);
reloadProtyle(item.editor.protyle, app, false);
updateTitle(item.editor.protyle.block.rootID, item.parent);
} else if (data.removeRootIDs.includes(item.editor.protyle.block.rootID)) {
item.parent.parent.removeTab(item.parent.id, false, false, false);