From 65ead1f7998de5eb3001a43edf8500d38b0f1d01 Mon Sep 17 00:00:00 2001 From: pewdiepie-archdaemon Date: Sat, 13 Jun 2026 08:03:10 +0900 Subject: [PATCH] Email library: reset select-mode + selectedUids on open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- static/js/emailLibrary.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/emailLibrary.js b/static/js/emailLibrary.js index 2ca295cbb..1fabecb22 100644 --- a/static/js/emailLibrary.js +++ b/static/js/emailLibrary.js @@ -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';