mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 21:08:49 +01:00
🎨 Show count in spaced repetition tree filter floating window https://github.com/siyuan-note/siyuan/issues/8202
This commit is contained in:
parent
ba5449a0b4
commit
2678dfc827
2 changed files with 34 additions and 18 deletions
|
|
@ -255,6 +255,21 @@ func RemoveBlockTreesByPathPrefix(pathPrefix string) {
|
|||
}
|
||||
}
|
||||
|
||||
func GetBlockTreesByBoxID(boxID string) (ret []*BlockTree) {
|
||||
blockTrees.Range(func(key, value interface{}) bool {
|
||||
slice := value.(*btSlice)
|
||||
slice.m.Lock()
|
||||
for _, b := range slice.data {
|
||||
if b.BoxID == boxID {
|
||||
ret = append(ret, b)
|
||||
}
|
||||
}
|
||||
slice.m.Unlock()
|
||||
return true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func RemoveBlockTreesByBoxID(boxID string) (ids []string) {
|
||||
blockTrees.Range(func(key, value interface{}) bool {
|
||||
slice := value.(*btSlice)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue