mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
⚡ Improve flashcard tree performance
This commit is contained in:
parent
fe9d83df13
commit
094593de25
1 changed files with 3 additions and 3 deletions
|
|
@ -396,12 +396,12 @@ func GetTreeDueFlashcards(rootID string, reviewedCardIDs []string) (ret []*Flash
|
||||||
}
|
}
|
||||||
|
|
||||||
func getTreeSubTreeChildBlocks(rootID string) (treeBlockIDs []string) {
|
func getTreeSubTreeChildBlocks(rootID string) (treeBlockIDs []string) {
|
||||||
tree, err := loadTreeByBlockID(rootID)
|
root := treenode.GetBlockTree(rootID)
|
||||||
if nil != err {
|
if nil == root {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
bts := treenode.GetBlockTreesByPathPrefix(strings.TrimSuffix(tree.Path, ".sy"))
|
bts := treenode.GetBlockTreesByPathPrefix(strings.TrimSuffix(root.Path, ".sy"))
|
||||||
for _, bt := range bts {
|
for _, bt := range bts {
|
||||||
treeBlockIDs = append(treeBlockIDs, bt.ID)
|
treeBlockIDs = append(treeBlockIDs, bt.ID)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue