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:
Tizian 「ティツィアーン」 2026-10-01 19:34:44 +02:00
commit f922fceb47
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -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();
}