Remove the ability to hide the channel sidebar on mobile

This commit is contained in:
brecert
2021-09-07 10:57:40 -04:00
parent 3f01dd07ac
commit 0e935234e2
3 changed files with 21 additions and 8 deletions

View File

@@ -89,6 +89,10 @@ const TextChannel = observer(({ channel }: { channel: ChannelI }) => {
}
}}
toggleChannelSidebar={() => {
if (isTouchscreenDevice) {
return
}
setChannels(!showChannels);
if (showChannels) {

View File

@@ -3,7 +3,7 @@ import { Notepad, Group } from "@styled-icons/boxicons-solid";
import { observer } from "mobx-react-lite";
import { Channel } from "revolt.js/dist/maps/Channels";
import { User } from "revolt.js/dist/maps/Users";
import styled from "styled-components";
import styled, { css } from "styled-components";
import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice";
@@ -69,9 +69,11 @@ const IconConainer = styled.div`
cursor: pointer;
color: var(--secondary-foreground);
&:hover {
color: var(--foreground);
}
${!isTouchscreenDevice && css`
&:hover {
color: var(--foreground);
}
`}
`
export default observer(({ channel, toggleSidebar, toggleChannelSidebar }: ChannelHeaderProps) => {