mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 08:38:37 +00:00
fix(sidebar): force open on mobile devices
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Route, Switch } from "react-router";
|
||||
|
||||
import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice";
|
||||
|
||||
import { useApplicationState } from "../../mobx/State";
|
||||
import { SIDEBAR_CHANNELS } from "../../mobx/stores/Layout";
|
||||
|
||||
@@ -11,7 +13,8 @@ import ServerSidebar from "./left/ServerSidebar";
|
||||
|
||||
export default observer(() => {
|
||||
const layout = useApplicationState().layout;
|
||||
const isOpen = layout.getSectionState(SIDEBAR_CHANNELS, true);
|
||||
const isOpen =
|
||||
isTouchscreenDevice || layout.getSectionState(SIDEBAR_CHANNELS, true);
|
||||
|
||||
return (
|
||||
<SidebarBase>
|
||||
|
||||
Reference in New Issue
Block a user