Skip to content

Commit

Permalink
fix(reset button): restore #650
Browse files Browse the repository at this point in the history
  • Loading branch information
st3v3nmw authored Mar 19, 2024
1 parent 606046f commit 7f7d2bb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [Unreleased]

- chore: add entry to Italian and Polish translation [`#898`](https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/898)
- [FEAT] Command to open notes review panel - #840. [`#846`](https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/846)
- Gui refactored into separate views | rewrite of keydown handler into event handler [`#873`](https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/873)
- Make reset button (flashcard review modal) enabled for both new and due cards [`#650`](https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/650)
Expand Down
1 change: 0 additions & 1 deletion src/Deck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export class Deck {

// The following selects distinct cards from cardList (based on reference equality)
const distinctCardSet = new Set(cardList);
// console.log(`getDistinctCardCount: ${this.deckName} ${distinctCardSet.size} ${this.getCardCount(cardListType, includeSubdeckCounts)}`);
return distinctCardSet.size;
}

Expand Down
1 change: 1 addition & 0 deletions src/gui/DecksListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class DecksListView {
this.contentEl.style.display = "block";
}
}

/**
* Shows the DeckListView
*/
Expand Down
6 changes: 1 addition & 5 deletions src/gui/FlashcardReviewView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,7 @@ export class FlashcardReviewView {
this.answerBtn.style.display = "none";
this.responseDiv.style.display = "grid";

if (this.currentCard.hasSchedule) {
this.resetButton.disabled = false;
}
this.resetButton.disabled = false;

if (this.currentQuestion.questionType !== CardType.Cloze) {
const hr: HTMLElement = document.createElement("hr");
Expand All @@ -368,13 +366,11 @@ export class FlashcardReviewView {

private async processReview(response: ReviewResponse): Promise<void> {
await this.reviewSequencer.processReview(response);
// console.log(`processReview: ${response}: ${this.currentCard?.front ?? 'None'}`)
await this.handleNextCard();
}

private async skipCurrentCard(): Promise<void> {
this.reviewSequencer.skipCurrentCard();
// console.log(`skipCurrentCard: ${this.currentCard?.front ?? 'None'}`)
await this.handleNextCard();
}

Expand Down

0 comments on commit 7f7d2bb

Please sign in to comment.