From 94ed4e3d0053f94a5d0fb3821721a6e65264ed50 Mon Sep 17 00:00:00 2001 From: Stephen Mwangi Date: Mon, 7 Jun 2021 22:44:05 +0300 Subject: [PATCH 1/2] save buryList data fix --- src/flashcard-modal.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/flashcard-modal.ts b/src/flashcard-modal.ts index 78756011..5b9c8775 100644 --- a/src/flashcard-modal.ts +++ b/src/flashcard-modal.ts @@ -322,8 +322,10 @@ export class FlashcardModal extends Modal { } buryRelatedCards(tillNextDay: boolean) { - if (tillNextDay) + if (tillNextDay) { this.plugin.data.buryList.push(cyrb53(this.currentCard.cardText)); + await this.plugin.savePluginData(); + } for (let relatedCard of this.currentCard.relatedCards) { let dueIdx = this.currentDeck.dueFlashcards.indexOf(relatedCard); From 0541e770ec80d0f060cf8349c5fc8a7b77eecfff Mon Sep 17 00:00:00 2001 From: Stephen Mwangi Date: Mon, 7 Jun 2021 22:49:31 +0300 Subject: [PATCH 2/2] make async --- src/flashcard-modal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flashcard-modal.ts b/src/flashcard-modal.ts index 5b9c8775..13504408 100644 --- a/src/flashcard-modal.ts +++ b/src/flashcard-modal.ts @@ -321,7 +321,7 @@ export class FlashcardModal extends Modal { this.currentDeck.nextCard(this); } - buryRelatedCards(tillNextDay: boolean) { + async buryRelatedCards(tillNextDay: boolean) { if (tillNextDay) { this.plugin.data.buryList.push(cyrb53(this.currentCard.cardText)); await this.plugin.savePluginData();