diff --git a/ftl/core/studying.ftl b/ftl/core/studying.ftl index 3cc23ffef..578a2ae9c 100644 --- a/ftl/core/studying.ftl +++ b/ftl/core/studying.ftl @@ -6,9 +6,13 @@ studying-buried-siblings = Buried Siblings studying-bury = Bury studying-bury-card = Bury Card studying-bury-note = Bury Note -studying-card-buried = Card buried. studying-card-suspended = Card suspended. studying-card-was-a-leech = Card was a leech. +studying-cards-buried = + { $count -> + [one] { $count } card buried. + *[other] { $count } cards buried. + } studying-cards-will-be-automatically-returned-to = Cards will be automatically returned to their original decks after you review them. studying-continue = Continue studying-delete-note = Delete Note @@ -25,7 +29,6 @@ studying-manually-buried-cards = Manually Buried Cards studying-mark-note = Mark Note studying-more = More studying-no-cards-are-due-yet = No cards are due yet. -studying-note-buried = Note buried. studying-note-suspended = Note suspended. studying-pause-audio = Pause Audio studying-please-run-toolsempty-cards = Please run Tools>Empty Cards diff --git a/qt/aqt/reviewer.py b/qt/aqt/reviewer.py index 47167363d..192ed11b2 100644 --- a/qt/aqt/reviewer.py +++ b/qt/aqt/reviewer.py @@ -1027,16 +1027,14 @@ time = %(time)d; ).success(lambda _: tooltip(tr.studying_card_suspended())).run_in_background() def bury_current_note(self) -> None: - bury_notes( - parent=self.mw, - note_ids=[self.card.nid], - ).success(lambda _: tooltip(tr.studying_note_buried())).run_in_background() + bury_notes(parent=self.mw, note_ids=[self.card.nid],).success( + lambda res: tooltip(tr.studying_cards_buried(count=res.count)) + ).run_in_background() def bury_current_card(self) -> None: - bury_cards( - parent=self.mw, - card_ids=[self.card.id], - ).success(lambda _: tooltip(tr.studying_card_buried())).run_in_background() + bury_cards(parent=self.mw, card_ids=[self.card.id],).success( + lambda res: tooltip(tr.studying_cards_buried(count=res.count)) + ).run_in_background() def delete_current_note(self) -> None: # need to check state because the shortcut is global to the main diff --git a/rslib/src/scheduler/bury_and_suspend.rs b/rslib/src/scheduler/bury_and_suspend.rs index 4d2fe9bf2..1553e4416 100644 --- a/rslib/src/scheduler/bury_and_suspend.rs +++ b/rslib/src/scheduler/bury_and_suspend.rs @@ -92,29 +92,32 @@ impl Collection { let mut count = 0; let usn = self.usn()?; let sched = self.scheduler_version(); + let desired_queue = match mode { + BuryOrSuspendMode::Suspend => CardQueue::Suspended, + BuryOrSuspendMode::BurySched => CardQueue::SchedBuried, + BuryOrSuspendMode::BuryUser => { + if sched == SchedulerVersion::V1 { + // v1 scheduler only had one bury type + CardQueue::SchedBuried + } else { + CardQueue::UserBuried + } + } + }; for original in self.storage.all_searched_cards()? { let mut card = original.clone(); - let desired_queue = match mode { - BuryOrSuspendMode::Suspend => CardQueue::Suspended, - BuryOrSuspendMode::BurySched => CardQueue::SchedBuried, - BuryOrSuspendMode::BuryUser => { - if sched == SchedulerVersion::V1 { - // v1 scheduler only had one bury type - CardQueue::SchedBuried - } else { - CardQueue::UserBuried - } - } - }; if card.queue != desired_queue { - if sched == SchedulerVersion::V1 { - card.remove_from_filtered_deck_restoring_queue(sched); - card.remove_from_learning(); + // do not bury suspended cards as that would unsuspend them + if card.queue != CardQueue::Suspended { + if sched == SchedulerVersion::V1 { + card.remove_from_filtered_deck_restoring_queue(sched); + card.remove_from_learning(); + } + card.queue = desired_queue; + count += 1; + self.update_card_inner(&mut card, original, usn)?; } - card.queue = desired_queue; - count += 1; - self.update_card_inner(&mut card, original, usn)?; } }