fix(history): remove selections atomically

This commit is contained in:
Sucukdeluxe
2026-08-21 00:59:45 +02:00
parent 3a95136ef1
commit 869dbc25be
11 changed files with 107 additions and 20 deletions
+4 -3
View File
@@ -3285,9 +3285,10 @@ export function App(): ReactElement {
if (!confirmed) {
return;
}
const results = await Promise.allSettled(ids.map((id) => window.rd.removeHistoryEntry(id)));
if (results.some((result) => result.status === "rejected")) {
showToast("Einige Verlaufseinträge konnten nicht entfernt werden");
try {
await window.rd.removeHistoryEntries(ids);
} catch {
showToast(ids.length === 1 ? "Verlaufseintrag konnte nicht entfernt werden" : "Verlaufseinträge konnten nicht entfernt werden");
await loadHistoryEntries();
return;
}