Skip to content

Commit ca5a41f

Browse files
committed
pref/display DSR
1 parent 704ab74 commit ca5a41f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/context/CardContext.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,17 @@ export function CardProvider({
218218
setShowTime(new Date().getTime());
219219
});
220220
if(note.card&&note.card.state==='Review'){
221-
const r = fsrs().get_retrievability(note.card,fixDate(new Date().toLocaleString("UTC",{timeZone:'UTC'})))
221+
const r = fsrs().get_retrievability(
222+
note.card,
223+
fixDate(new Date().toLocaleString("UTC", { timeZone: "UTC" })),
224+
true
225+
);
222226
if(r){
223227
setDSR({
224-
D:note.card.difficulty,
225-
S:note.card.stability,
226-
R:r
227-
})
228+
D: note.card.difficulty,
229+
S: Math.round(note.card.stability),
230+
R: r,
231+
});
228232
}else{
229233
setDSR(undefined)
230234
}

0 commit comments

Comments
 (0)