Skip to content

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

:art: Improve list item, super block and blockquote backlink propagation https://github.com/siyuan-note/siyuan/issues/13776

Daniel042b5e77eab0
diff --git a/kernel/model/blockinfo.go b/kernel/model/blockinfo.go
index 31a5a59725..ab092852af 100644
--- a/kernel/model/blockinfo.go
+++ b/kernel/model/blockinfo.go
@@ -91,9 +91,7 @@ func GetDocInfo(blockID string) (ret *BlockInfo) {
}
ret.RefIDs, _ = sql.QueryRefIDsByDefID(blockID, Conf.Editor.BacklinkContainChildren)
- originalRefBlockIDs := map[string]string{}
- // TODO
- buildBacklinkListItemRefs(&ret.RefIDs, &originalRefBlockIDs)
+ buildBacklinkListItemRefs(&ret.RefIDs, &map[string]string{})
ret.RefCount = len(ret.RefIDs) // 填充块引计数
// 填充属性视图角标 Display the database title on the block superscript https://github.com/siyuan-note/siyuan/issues/10545
diff --git a/kernel/model/file.go b/kernel/model/file.go
index d69dc9f6ec..0af69204df 100644
--- a/kernel/model/file.go
+++ b/kernel/model/file.go
@@ -604,7 +604,7 @@ func GetDoc(startID, endID, id string, index int, query string, queryTypes map[s
if isBacklink {
// 引用计数浮窗请求,需要按照反链逻辑组装 https://github.com/siyuan-note/siyuan/issues/6853
originalRefBlockIDs := map[string]string{}
- // TODO
+ // TODO 需要增加参数,使用 getRefIDs 返回的 originalRefBlockIDs 增加这个参数后才能支持计数浮窗内计算折叠状态 https://github.com/siyuan-note/siyuan/issues/13776
nodes, isBacklinkExpand = getBacklinkRenderNodes(node, originalRefBlockIDs)
} else {
// 如果同时存在 startID 和 endID,并且是动态加载的情况,则只加载 startID 和 endID 之间的块 [startID, endID]