From 839dacc4a42dd40bc3e38d066223678de33596d1 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 21 Sep 2024 15:53:29 +0200 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 3 ++- src/lib/components/chat/ChatControls.svelte | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 363aae8ac..b6a90a953 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -292,7 +292,8 @@ const currentSize = controlPane.getSize(); if (currentSize === 0) { - controlPane.resize(parseInt(localStorage?.chatControlsSize ?? '30')); + const size = parseInt(localStorage?.chatControlsSize ?? '30'); + controlPane.resize(size ? size : 30); } } else { controlPane.resize(0); diff --git a/src/lib/components/chat/ChatControls.svelte b/src/lib/components/chat/ChatControls.svelte index bf0ddcdc1..ef21efa6e 100644 --- a/src/lib/components/chat/ChatControls.svelte +++ b/src/lib/components/chat/ChatControls.svelte @@ -122,7 +122,11 @@ { console.log(size); if (size === 0) {