From 510d268ba2fbc1294f252ddb8da6925cf43fd76d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 3 Sep 2022 19:49:52 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/5804 --- app/src/layout/dock/Outline.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts index 963759858..0c5097541 100644 --- a/app/src/layout/dock/Outline.ts +++ b/app/src/layout/dock/Outline.ts @@ -93,10 +93,10 @@ export class Outline extends Model { data: null, click: (element: HTMLElement) => { const id = element.getAttribute("data-node-id"); - fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => { + fetchPost("/api/attr/getBlockAttrs", {id}, (attrResponse) => { openFileById({ id, - action: foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_FOCUS, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML], + action: attrResponse.data["heading-fold"] === "1" ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_FOCUS, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML], }); }); }