From 099b784ea088b3a9f047669eaf605c9914cb0509 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 13 Apr 2023 10:09:50 +0800 Subject: [PATCH] :art: Improve the initialization interface to select the workspace cloud disk path prompt Fix https://github.com/siyuan-note/siyuan/issues/7975 --- app/electron/init.html | 4 +--- kernel/model/flashcard.go | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/electron/init.html b/app/electron/init.html index f80f65e9b..baa3196f1 100644 --- a/app/electron/init.html +++ b/app/electron/init.html @@ -358,8 +358,7 @@ const {ipcRenderer} = require('electron') const fs = require('fs') const initPath = result.filePaths[0] - const absPathLower = initPath.toLowerCase() - if (isICloudPath(absPathLower)) { + if (isICloudPath(initPath)) { let msg = '⚠️ This folder is under the iCloud sync path, please change another path' if ('zh_CN' === currentLang) { msg = '⚠️ 该文件夹位于 iCloud 同步路径下,请更换其他路径' @@ -368,7 +367,6 @@ return } - if (isCloudDrivePath(initPath)) { let msg = '⚠️ The folder path can not contain onedrive, dropbox, google drive, pcloud and 坚果云, please change another path' if ('zh_CN' === currentLang) { diff --git a/kernel/model/flashcard.go b/kernel/model/flashcard.go index 6f614596e..c230b47d1 100644 --- a/kernel/model/flashcard.go +++ b/kernel/model/flashcard.go @@ -818,6 +818,12 @@ func getDeckDueCards(deck *riff.Deck, reviewedCardIDs, blockIDs []string) (ret [ } dues = tmp + if 1 > len(reviewedCardIDs) { + // 未传入已复习的卡片 ID,说明是开始新的复习,需要清空缓存 + reviewCardCache = map[string]riff.Card{} + skipCardCache = map[string]riff.Card{} + } + newCount := 0 reviewCount := 0 for _, c := range dues {