perf(learn): Delete now leaves Recently deleted at once

Deleting a studyset for good blanks and deletes every card, note, path
and PDF of its subtree before the studyset's row goes, which took about
3 s while the studyset stayed in Recently deleted. Now the repository's
Recently deleted leaves it out at once (StudysetRepository.leaving and
stay, applied to the value last read without reading again), the
deletion runs in the background, still one at a time in
StudysetDeletions' queue, and where it fails the studyset shows there
again, read anew with what is left of it, and a snack bar says so.

Whats-New: Delete now in Recently deleted takes a studyset away at once.
Whats-New-De: „Jetzt löschen“ unter „Zuletzt gelöscht“ entfernt ein Lernset sofort.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-07 23:01:59 +01:00
commit 920e1c6c13
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
5 changed files with 190 additions and 7 deletions

View file

@ -36,6 +36,8 @@
"libraryDeleteForGoodMessage": "„{title}“ wird samt allem, was darin ist, und allen zugehörigen Karten auf all deinen Geräten gelöscht. Das lässt sich nicht rückgängig machen.",
"@libraryDeleteForGoodMessage": {"placeholders": {"title": {"type": "String"}}},
"libraryDeleteForGoodConfirm": "Endgültig löschen",
"libraryDeleteForGoodFailed": "„{title}“ ließ sich nicht löschen. Es ist wieder unter „Zuletzt gelöscht“.",
"@libraryDeleteForGoodFailed": {"placeholders": {"title": {"type": "String"}}},
"studysetSheetCreateTitle": "Lernset erstellen",
"studysetSheetEditTitle": "Lernset bearbeiten",

View file

@ -51,6 +51,13 @@
}
},
"libraryDeleteForGoodConfirm": "Delete for good",
"libraryDeleteForGoodFailed": "“{title}” couldn't be deleted. It's back in Recently deleted.",
"@libraryDeleteForGoodFailed": {
"description": "A snack bar when deleting a studyset for good, which left Recently deleted at once, failed and it shows there again.",
"placeholders": {
"title": {"type": "String"}
}
},
"studysetSheetCreateTitle": "Create studyset",
"studysetSheetEditTitle": "Edit studyset",

View file

@ -280,6 +280,12 @@ abstract class AppLocalizations {
/// **'Delete for good'**
String get libraryDeleteForGoodConfirm;
/// A snack bar when deleting a studyset for good, which left Recently deleted at once, failed and it shows there again.
///
/// In en, this message translates to:
/// **'“{title}” couldn\'t be deleted. It\'s back in Recently deleted.'**
String libraryDeleteForGoodFailed(String title);
/// No description provided for @studysetSheetCreateTitle.
///
/// In en, this message translates to:

View file

@ -115,6 +115,11 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get libraryDeleteForGoodConfirm => 'Endgültig löschen';
@override
String libraryDeleteForGoodFailed(String title) {
return '„$title“ ließ sich nicht löschen. Es ist wieder unter „Zuletzt gelöscht“.';
}
@override
String get studysetSheetCreateTitle => 'Lernset erstellen';

View file

@ -113,6 +113,11 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get libraryDeleteForGoodConfirm => 'Delete for good';
@override
String libraryDeleteForGoodFailed(String title) {
return '“$title” couldn\'t be deleted. It\'s back in Recently deleted.';
}
@override
String get studysetSheetCreateTitle => 'Create studyset';