🐛 搜索处于折叠状态的块时未聚焦显示结果 Fix https://github.com/siyuan-note/siyuan/issues/7252

This commit is contained in:
Liang Ding 2023-02-03 23:37:46 +08:00
parent aa74cacdb0
commit 3fb296c88c
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 17 additions and 13 deletions

View file

@ -87,6 +87,22 @@ type Path struct {
Created string `json:"created"` // 创建时间
}
func IsBlockFolded(id string) bool {
for i := 0; i < 32; i++ {
b, _ := getBlock(id, nil)
if nil == b {
return true
}
if "1" == b.IAL["fold"] {
return true
}
id = b.ParentID
}
return false
}
func RecentUpdatedBlocks() (ret []*Block) {
ret = []*Block{}