Email library: reset select-mode + selectedUids on open

Was sticking on toggled-on state if the user closed the library
while in select-mode — reopening showed the Cancel/X toggle even
though no emails were selected. Force-reset state._selectMode and
state._selectedUids in openEmailLibrary so each open starts fresh.
This commit is contained in:
pewdiepie-archdaemon
2026-06-13 08:03:10 +09:00
parent 6cc45a4f77
commit 65ead1f799
+4
View File
@@ -788,6 +788,10 @@ export function openEmailLibrary(opts = {}) {
state._libOffset = 0;
state._libSearch = '';
state._libSearchDraft = '';
// Reset select-mode on each open so the toolbar Select button
// never opens already-toggled-on after a previous session.
state._selectMode = false;
if (state._selectedUids) state._selectedUids.clear();
state._libSearchPills = [];
_libSuggestionCache = null;
state._libFilter = 'all';