feat(app): reset a studyset's progress, with an undo
The studyset's options offer Reset progress: after asking, every card in it and in the studysets inside it starts afresh as new (a 'reset' entry each), its history kept; an undo for a few seconds deletes those entries again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
46855ab251
commit
f922fceb47
1 changed files with 180 additions and 1 deletions
|
|
@ -27,6 +27,15 @@ class FakeReviewGateway() implements ReviewGateway {
|
|||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> deleteResets(Set<String> cardIds, DateTime at) async =>
|
||||
rows.removeWhere(
|
||||
(row) =>
|
||||
cardIds.contains(row.cardId) &&
|
||||
row.mode == 'reset' &&
|
||||
row.reviewedAt == at,
|
||||
);
|
||||
|
||||
@override
|
||||
Stream<void> get remoteChanges => const Stream.empty();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue