mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 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:
parent
87a04f7965
commit
e54641f2c1
8 changed files with 40 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue