Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-12-22 11:31:02 +08:00
commit badaf6ffb8
3 changed files with 8 additions and 8 deletions

View file

@ -56,7 +56,7 @@ require (
github.com/siyuan-note/filelock v0.0.0-20231211015131-3b3dfabdce9c
github.com/siyuan-note/httpclient v0.0.0-20231219001541-d75e4dce39fa
github.com/siyuan-note/logging v0.0.0-20231208035918-61f884c854f0
github.com/siyuan-note/riff v0.0.0-20231221011852-241358ff96df
github.com/siyuan-note/riff v0.0.0-20231222032533-1f1b309dbc08
github.com/spf13/cast v1.6.0
github.com/steambap/captcha v1.4.1
github.com/studio-b12/gowebdav v0.9.0

View file

@ -366,8 +366,8 @@ github.com/siyuan-note/httpclient v0.0.0-20231219001541-d75e4dce39fa h1:kfWxJzNP
github.com/siyuan-note/httpclient v0.0.0-20231219001541-d75e4dce39fa/go.mod h1:ejS8ChupXGP89C8N4nM+xhyxVVf/IfcwOXboql6o3+g=
github.com/siyuan-note/logging v0.0.0-20231208035918-61f884c854f0 h1:+XjUr9UMXsczdO2bGA72p/k9wa2ShPb8ybi7CDBJ7HQ=
github.com/siyuan-note/logging v0.0.0-20231208035918-61f884c854f0/go.mod h1:6mRFtAAvYPn3cDzqvyv+t8BVPGqpONDMMb5ywOhY1D4=
github.com/siyuan-note/riff v0.0.0-20231221011852-241358ff96df h1:v/lE1SBL4wd0cAbhr+o2GAdafBQhhikKauCSKGCkO6M=
github.com/siyuan-note/riff v0.0.0-20231221011852-241358ff96df/go.mod h1:wLzj67jwt8PM+qWPGlC4V7m0fzkUlkwPKf9vLF6ru/k=
github.com/siyuan-note/riff v0.0.0-20231222032533-1f1b309dbc08 h1:vPZqpEIT8gqtFM23FHbxhaCeCzccHB/KFR7OEZfAt0U=
github.com/siyuan-note/riff v0.0.0-20231222032533-1f1b309dbc08/go.mod h1:wLzj67jwt8PM+qWPGlC4V7m0fzkUlkwPKf9vLF6ru/k=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.7 h1:I6tZjLXD2Q1kjvNbIzB1wvQBsXmKXiVrhpRE8ZjP5jY=

View file

@ -29,7 +29,6 @@ import (
"github.com/88250/gulu"
"github.com/88250/lute/ast"
"github.com/88250/lute/parse"
"github.com/open-spaced-repetition/go-fsrs"
"github.com/siyuan-note/filelock"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/riff"
@ -1020,17 +1019,18 @@ func getDeckDueCards(deck *riff.Deck, reviewedCardIDs, blockIDs []string, newCar
continue
}
fsrsCard := c.Impl().(*fsrs.Card)
if fsrs.New == fsrsCard.State {
newCount++
if riff.New == c.GetState() {
if newCount > newCardLimit {
continue
}
newCount++
} else {
reviewCount++
if reviewCount > reviewCardLimit {
continue
}
reviewCount++
}
if 0 < len(reviewedCardIDs) {