Skip to content

Commit

Permalink
UPDATE: Improved card title in random mode
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKlus committed May 10, 2024
1 parent 67bd96d commit 62f0b89
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/gui/FlashcardReviewView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,6 @@ export class FlashcardReviewView {
this._resetResponseButtons();
}

// -> Functions & helpers

private _keydownHandler = (e: KeyboardEvent) => {
// Prevents any input, if the edit modal is open
if (
Expand Down Expand Up @@ -387,11 +385,11 @@ export class FlashcardReviewView {
private _setTitle(deck: Deck) {
const isRandomMode = this.settings.flashcardCardOrder === "EveryCardRandomDeckAndCard";
let text = deck.deckName;
if (!isRandomMode) {
const deckStats = this.reviewSequencer.getDeckStats(deck.getTopicPath());
const cardsInQueue = deckStats.dueCount + deckStats.newCount;
text += `: ${cardsInQueue}`;
}

const deckStats = this.reviewSequencer.getDeckStats(deck.getTopicPath());
const cardsInQueue = deckStats.dueCount + deckStats.newCount;
text += `: ${cardsInQueue}`;

this.title.setText(text);
}

Expand Down

0 comments on commit 62f0b89

Please sign in to comment.