mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 01:35:36 -04:00
Email library bulk Done: animate-out + drop when filter='undone'
Repro: filter Undone → Select All → uncheck a few → Actions → Done → nothing visible happens. Reason: the bulk-Done branch only flipped em.is_answered on the in-memory entries; the cards stayed in state._libEmails so they kept rendering, but now with the done check ticked. From the user's POV — still 'undone' filter, cards still there — it looked like the action was a no-op. When the filter is 'undone' specifically, treat marking done as a view-removal (same animate-then-prune step archive/delete uses).
This commit is contained in:
@@ -5046,6 +5046,14 @@ async function _bulkAction(action) {
|
||||
await _animateEmailCardRemoval(uids);
|
||||
const removed = new Set(uids.map(uid => String(uid)));
|
||||
state._libEmails = state._libEmails.filter(e => !removed.has(String(e.uid)));
|
||||
} else if (action === 'done' && state._libFilter === 'undone') {
|
||||
// The undone filter is a "show only not-done" view — after marking
|
||||
// selected emails done, they no longer match. Animate them out and
|
||||
// drop them from the local list so the view reflects the filter
|
||||
// instead of leaving freshly-done cards sitting there.
|
||||
await _animateEmailCardRemoval(uids);
|
||||
const removed = new Set(uids.map(uid => String(uid)));
|
||||
state._libEmails = state._libEmails.filter(e => !removed.has(String(e.uid)));
|
||||
}
|
||||
} finally {
|
||||
if (busySpinner) busySpinner.destroy();
|
||||
|
||||
Reference in New Issue
Block a user