From 10a028c15381bcc399d90e75cebbdc4de066cb6c Mon Sep 17 00:00:00 2001 From: Flemmli97 <34157027+Flemmli97@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:50:56 +0100 Subject: [PATCH] fix(mobile): Hide initial sidebar on mobile (#911) --- src/lib/state/ui/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/state/ui/index.ts b/src/lib/state/ui/index.ts index 598e9cb8d..aaf0b463e 100644 --- a/src/lib/state/ui/index.ts +++ b/src/lib/state/ui/index.ts @@ -4,6 +4,7 @@ import { createPersistentState } from ".." import { EmojiFont, Font, Identicon, Route } from "$lib/enums" import { Store as MainStore } from "../Store" import { page } from "$app/stores" +import { checkMobile } from "$lib/utils/Mobile" export interface IUIState { color: Writable @@ -36,7 +37,7 @@ class Store { emojiFont: createPersistentState("uplink.ui.emojiFont", EmojiFont.Fluent), theme: createPersistentState("uplink.ui.theme", "default"), cssOverride: createPersistentState("uplink.ui.cssOverride", ""), - sidebarOpen: createPersistentState("uplink.ui.sidebarOpen", true), + sidebarOpen: createPersistentState("uplink.ui.sidebarOpen", !checkMobile()), chats: createPersistentState("uplink.ui.chats", [], { deserializer: (c: Chat[]) => { // The typing indicator is read as an {}. Init it properly here