From 98928f6bd79c2a0a998c9b16de753ecf4e281505 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 21 Sep 2024 03:37:28 +0200 Subject: [PATCH] enh: save chat controls width --- src/lib/components/chat/ChatControls.svelte | 6 +++++- src/lib/components/layout/Navbar.svelte | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/ChatControls.svelte b/src/lib/components/chat/ChatControls.svelte index 5c5962d7f..db53b73f6 100644 --- a/src/lib/components/chat/ChatControls.svelte +++ b/src/lib/components/chat/ChatControls.svelte @@ -121,10 +121,14 @@ { if (size === 0) { showControls.set(false); + } else if (size < 35) { + pane.resize(0); } else { if (!$showControls) { showControls.set(true); diff --git a/src/lib/components/layout/Navbar.svelte b/src/lib/components/layout/Navbar.svelte index fec277a0c..7eec21609 100644 --- a/src/lib/components/layout/Navbar.svelte +++ b/src/lib/components/layout/Navbar.svelte @@ -115,7 +115,9 @@ if (controlPane) { if ($showControls) { - controlPane.resize(localStorage.getItem('chat-controls-size') || 40); + controlPane.resize( + Math.max(parseInt(localStorage.getItem('chat-controls-size') || '35'), 35) + ); } else { controlPane.resize(0); }