mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-31 13:58:49 +01:00
This commit is contained in:
parent
8593247172
commit
6fa661982d
1 changed files with 6 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ func AddFlashcard(blockID string, deckName string) (err error) {
|
|||
}
|
||||
|
||||
func InitFlashcards() {
|
||||
riffSavePath := filepath.Join(util.DataDir, "storage", "riff")
|
||||
riffSavePath := getRiffDir()
|
||||
if !gulu.File.IsDir(riffSavePath) {
|
||||
return
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ func InitFlashcards() {
|
|||
}
|
||||
|
||||
func CreateDeck(name string) (err error) {
|
||||
riffSavePath := filepath.Join(util.DataDir, "storage", "riff")
|
||||
riffSavePath := getRiffDir()
|
||||
deck, err := riff.LoadDeck(riffSavePath, name, riff.AlgoFSRS)
|
||||
if nil != err {
|
||||
logging.LogErrorf("load deck [%s] failed: %s", name, err)
|
||||
|
|
@ -103,3 +103,7 @@ func SaveDeck(name string) (err error) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
func getRiffDir() string {
|
||||
return filepath.Join(util.DataDir, "storage", "riff")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue