diff --git a/plugins/webmail_plugin_labels/webmail_plugin_labels/ui/sidebar.js b/plugins/webmail_plugin_labels/webmail_plugin_labels/ui/sidebar.js index 2ada133..81e534b 100644 --- a/plugins/webmail_plugin_labels/webmail_plugin_labels/ui/sidebar.js +++ b/plugins/webmail_plugin_labels/webmail_plugin_labels/ui/sidebar.js @@ -110,6 +110,10 @@ export default function mount(el, ctx) { if (!name) { adding = null; render(); return; } await ctx.api.pluginFetch("/labels", { method: "POST", body: JSON.stringify({ name }) }); adding = null; + // Creating a label while the section is collapsed would hide the thing you + // just made, so open it — and remember that, the way the chevron does. + collapsed = false; + try { localStorage.setItem("labels.collapsed", "0"); } catch { /* ignore */ } window.dispatchEvent(new Event("webmail:labels-changed")); }