From bc1399462f2671eae62d562dc78dd484d42cffa2 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 23 Dec 2022 22:58:46 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=94=AF=E6=8C=81=E9=97=B4=E9=9A=94?= =?UTF-8?q?=E5=A4=8D=E4=B9=A0=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/6710?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/flashcard.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/model/flashcard.go b/kernel/model/flashcard.go index 036f4b721..3b4d20677 100644 --- a/kernel/model/flashcard.go +++ b/kernel/model/flashcard.go @@ -22,6 +22,7 @@ import ( "path/filepath" "strings" "sync" + "time" "github.com/88250/gulu" "github.com/88250/lute" @@ -331,6 +332,13 @@ func InitFlashcards() { continue } + if 0 == deck.Created { + deck.Created = time.Now().Unix() + } + if 0 == deck.Updated { + deck.Updated = time.Now().UnixMilli() + } + Decks[deckID] = deck } }