🎨 Flashcard new/review card limit support configure to 0 Fix https://github.com/siyuan-note/siyuan/issues/7841

This commit is contained in:
Liang Ding 2023-03-31 11:52:56 +08:00
parent 8a2a724341
commit 307eab1b35
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 10 additions and 10 deletions

View file

@ -95,12 +95,12 @@ func setFlashcard(c *gin.Context) {
return
}
if 1 > flashcard.NewCardLimit {
flashcard.NewCardLimit = 1
if 0 > flashcard.NewCardLimit {
flashcard.NewCardLimit = 20
}
if 1 > flashcard.ReviewCardLimit {
flashcard.ReviewCardLimit = 1
if 0 > flashcard.ReviewCardLimit {
flashcard.ReviewCardLimit = 200
}
model.Conf.Flashcard = flashcard