feat(app): lock the study screen, and undo the last rating

- Lock screen (header): a light scrim takes every touch; a tap shows
  Unlock for three seconds. Time locked doesn't count to the session's,
  and a running Pomodoro timer pauses, going on once unlocked (also
  when the session is left locked).
- Undo last rating (header): takes back one rating at a time within the
  round, its review deleted from the log, the round as it was; the card
  shows again from its question. Starting a round anew, or deleting a
  card, clears what can be undone.
- The review log deletes entries of any kind made at a moment (resets
  and ratings alike).

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-07 21:06:58 +02:00
commit aad6110da3
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -37,13 +37,16 @@ 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,
);
Future<void> deleteReviews(
Set<String> cardIds,
DateTime at,
String mode,
) async => rows.removeWhere(
(row) =>
cardIds.contains(row.cardId) &&
row.mode == mode &&
row.reviewedAt == at,
);
@override
Stream<void> get remoteChanges => const Stream.empty();