mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-07 01:08:49 +01:00
🎨 支持浏览卡包内的闪卡 https://github.com/siyuan-note/siyuan/issues/6943
This commit is contained in:
parent
7d450f88eb
commit
38570cb27f
2 changed files with 7 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ import (
|
|||
var Decks = map[string]*riff.Deck{}
|
||||
var deckLock = sync.Mutex{}
|
||||
|
||||
func GetFlashcards(deckID string, page int) (blockIDs []string) {
|
||||
func GetFlashcards(deckID string, page int) (blockIDs []string, total, pageCount int) {
|
||||
deck := Decks[deckID]
|
||||
if nil == deck {
|
||||
return
|
||||
|
|
@ -60,6 +60,8 @@ func GetFlashcards(deckID string, page int) (blockIDs []string) {
|
|||
end = len(allBlockIDs)
|
||||
}
|
||||
blockIDs = allBlockIDs[start:end]
|
||||
total = len(allBlockIDs)
|
||||
pageCount = total / 20
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue