🎨 Support Jump to the next block in the parent level on focus status https://github.com/siyuan-note/siyuan/issues/9527

This commit is contained in:
Daniel 2023-10-28 11:25:21 +08:00
parent 87a04f7965
commit e54641f2c1
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
8 changed files with 40 additions and 5 deletions

View file

@ -89,6 +89,25 @@ type Path struct {
Created string `json:"created"` // 创建时间
}
func GetParentNextChildID(id string) string {
tree, err := loadTreeByBlockID(id)
if nil != err {
return ""
}
node := treenode.GetNodeInTree(tree, id)
if nil == node {
return ""
}
for p := node.Parent; nil != p; p = p.Parent {
if nil != p.Next {
return p.Next.ID
}
}
return ""
}
func IsBlockFolded(id string) bool {
for i := 0; i < 32; i++ {
b, _ := getBlock(id, nil)