Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/16494

Vanessa73638be0c3c6
diff --git a/app/src/mobile/dock/MobileOutline.ts b/app/src/mobile/dock/MobileOutline.ts
index 8cc5d57114..e036b08415 100644
--- a/app/src/mobile/dock/MobileOutline.ts
+++ b/app/src/mobile/dock/MobileOutline.ts
@@ -104,7 +104,9 @@ export class MobileOutline extends Model {
}
} else {
checkFold(id, (zoomIn) => {
- openMobileFileById(options.app, id, zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL, Constants.CB_GET_HTML, Constants.CB_GET_OUTLINE] : [Constants.CB_GET_HL, Constants.CB_GET_OUTLINE, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]);
+ openMobileFileById(options.app, id, zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL, Constants.CB_GET_HTML, Constants.CB_GET_OUTLINE] :
+ [Constants.CB_GET_HL, Constants.CB_GET_OUTLINE, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML],
+ "start");
});
}
},
diff --git a/app/src/mobile/editor.ts b/app/src/mobile/editor.ts
index 4911e0be2f..c249184709 100644
--- a/app/src/mobile/editor.ts
+++ b/app/src/mobile/editor.ts
@@ -42,7 +42,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[
if (blockElement) {
pushBack();
if (action.includes(Constants.CB_GET_HL)) {
- highlightById(window.siyuan.mobile.editor.protyle, id);
+ highlightById(window.siyuan.mobile.editor.protyle, id, scrollPosition);
} else {
scrollCenter(window.siyuan.mobile.editor.protyle, blockElement, scrollPosition);
}
@@ -61,6 +61,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[
const protyleOptions: IProtyleOptions = {
blockId: id,
rootId: data.data.rootID,
+ scrollPosition,
action,
render: {
scroll: true,
@@ -105,6 +106,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[
data: getResponse,
protyle: window.siyuan.mobile.editor.protyle,
action,
+ scrollPosition,
afterCB() {
app.plugins.forEach(item => {
item.eventBus.emit("switch-protyle", {protyle: window.siyuan.mobile.editor.protyle});