Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-09-12 19:48:51 +08:00
parent 9f76274747
commit eca318c4ff
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -234,6 +234,22 @@ func GetBlockSiblingID(id string) (parent, previous, next string) {
next = flb.ID next = flb.ID
} }
} }
if "" == previous && "" == next && nil != current {
parent = current.ID
if nil != current.Previous {
previous = current.Previous.ID
if flb := treenode.FirstChildBlock(current.Previous); nil != flb {
previous = flb.ID
}
}
if nil != current.Next {
next = current.Next.ID
if flb := treenode.FirstChildBlock(current.Next); nil != flb {
next = flb.ID
}
}
}
return return
} }