diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bed66b3..1cc39a66 120000 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -docs/changelog.md \ No newline at end of file +docs/changelog.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 651dc17d..9815d5bd 120000 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1 @@ -docs/en/contributing.md \ No newline at end of file +docs/en/contributing.md diff --git a/docs/changelog.md b/docs/changelog.md index 66d8c2fb..bb6f6c4f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### Unreleased + +- Make reset button (flashcard review modal) enabled for both new and due cards https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/650 + #### [1.11.2](https://github.com/st3v3nmw/obsidian-spaced-repetition/compare/1.11.1...1.11.2) - Bug 495 Obsidian SRS ignores more than one tag https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/834 diff --git a/src/FlashcardReviewSequencer.ts b/src/FlashcardReviewSequencer.ts index d4c9eda3..5ef74668 100644 --- a/src/FlashcardReviewSequencer.ts +++ b/src/FlashcardReviewSequencer.ts @@ -139,10 +139,16 @@ export class FlashcardReviewSequencer implements IFlashcardReviewSequencer { } async processReview_ReviewMode(response: ReviewResponse): Promise { - this.currentCard.scheduleInfo = this.determineCardSchedule(response, this.currentCard); - - // Update the source file with the updated schedule - await this.currentQuestion.writeQuestion(this.settings); + if (response != ReviewResponse.Reset || this.currentCard.hasSchedule) { + // We need to update the schedule if: + // (1) the user reviewed with easy/good/hard (either a new or due card), + // (2) or reset a due card + // Nothing to do if a user resets a new card + this.currentCard.scheduleInfo = this.determineCardSchedule(response, this.currentCard); + + // Update the source file with the updated schedule + await this.currentQuestion.writeQuestion(this.settings); + } // Move/delete the card if (response == ReviewResponse.Reset) { diff --git a/src/gui/flashcard-modal.tsx b/src/gui/flashcard-modal.tsx index f73cbca9..954ab62b 100644 --- a/src/gui/flashcard-modal.tsx +++ b/src/gui/flashcard-modal.tsx @@ -407,9 +407,7 @@ export class FlashcardModal extends Modal { 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");