Skip to content

Commit af42140

Browse files
fix: Only consider filtered notes for next note (#1089)
The previous patch #1088 missed to change the conditional to also include only the filtered notes. With this patch, if all scheduled notes are in the future, it will choose a new note for review.
1 parent e92eabc commit af42140

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/note-review-deck.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ export class NoteReviewDeck {
8181

8282
determineNextNote(openRandomNote: boolean): ISRFile {
8383
// Review due notes before new ones
84-
if (this.dueNotesCount > 0) {
85-
const todayUnix: number = globalDateProvider.today.valueOf();
86-
const dueNotes = this.scheduledNotes.filter((note) => note.isDue(todayUnix));
84+
const todayUnix: number = globalDateProvider.today.valueOf();
85+
const dueNotes = this.scheduledNotes.filter((note) => note.isDue(todayUnix));
86+
if (dueNotes.length > 0) {
8787
const index = openRandomNote
8888
? globalRandomNumberProvider.getInteger(0, dueNotes.length - 1)
8989
: 0;

0 commit comments

Comments
 (0)