mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 18:20:26 +08:00
🎨 Improve flashcard import https://github.com/siyuan-note/siyuan/issues/14402
This commit is contained in:
parent
9945ad7a7a
commit
b883f07cb4
@ -936,8 +936,7 @@ func (tx *Transaction) doAddFlashcards(operation *Operation) (ret *TxErr) {
|
||||
continue
|
||||
}
|
||||
|
||||
cardID := ast.NewNodeID()
|
||||
deck.AddCard(cardID, blockID)
|
||||
deck.AddCard(ast.NewNodeID(), blockID)
|
||||
}
|
||||
|
||||
if err := deck.Save(); err != nil {
|
||||
|
@ -352,7 +352,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
||||
bIDs := deckToImport.GetBlockIDs()
|
||||
cards := deckToImport.GetCardsByBlockIDs(bIDs)
|
||||
for _, card := range cards {
|
||||
deck.AddCard(card.ID(), blockIDs[card.BlockID()])
|
||||
deck.AddCard(ast.NewNodeID(), blockIDs[card.BlockID()])
|
||||
}
|
||||
|
||||
if 0 < len(cards) {
|
||||
|
Loading…
Reference in New Issue
Block a user