🎨 The backlink panel no longer displays child-block references https://github.com/siyuan-note/siyuan/issues/12861

This commit is contained in:
Daniel 2024-10-21 17:34:21 +08:00
parent 071fbf0605
commit dd256bbaec
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 16 additions and 8 deletions

View file

@ -51,7 +51,7 @@ func getBackmentionDoc(c *gin.Context) {
defID := arg["defID"].(string)
refTreeID := arg["refTreeID"].(string)
keyword := arg["keyword"].(string)
containChildren := true
containChildren := false
if val, ok := arg["containChildren"]; ok {
containChildren = val.(bool)
}
@ -73,7 +73,7 @@ func getBacklinkDoc(c *gin.Context) {
defID := arg["defID"].(string)
refTreeID := arg["refTreeID"].(string)
keyword := arg["keyword"].(string)
containChildren := true
containChildren := false
if val, ok := arg["containChildren"]; ok {
containChildren = val.(bool)
}
@ -109,7 +109,11 @@ func getBacklink2(c *gin.Context) {
if nil != mentionSortArg {
mentionSort, _ = strconv.Atoi(mentionSortArg.(string))
}
boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink2(id, keyword, mentionKeyword, sort, mentionSort)
containChildren := false
if val, ok := arg["containChildren"]; ok {
containChildren = val.(bool)
}
boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink2(id, keyword, mentionKeyword, sort, mentionSort, containChildren)
ret.Data = map[string]interface{}{
"backlinks": backlinks,
"linkRefsCount": linkRefsCount,
@ -141,7 +145,11 @@ func getBacklink(c *gin.Context) {
if nil != arg["beforeLen"] {
beforeLen = int(arg["beforeLen"].(float64))
}
boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink(id, keyword, mentionKeyword, beforeLen)
containChildren := false
if val, ok := arg["containChildren"]; ok {
containChildren = val.(bool)
}
boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink(id, keyword, mentionKeyword, beforeLen, containChildren)
ret.Data = map[string]interface{}{
"backlinks": backlinks,
"linkRefsCount": linkRefsCount,