fix: only allow to swipe left if there is a right sidebar

This commit is contained in:
Divlo 2022-04-09 11:10:34 +02:00
parent 8bb4ef8b54
commit 5ef8f18060
No known key found for this signature in database
GPG Key ID: 8F9478F220CE65E9

View File

@ -121,6 +121,7 @@ export const Application: React.FC<ApplicationProps> = (props) => {
}) })
}, },
onSwipedLeft: () => { onSwipedLeft: () => {
if (isGuildsChannelsPath(path)) {
if (visibleSidebars.left) { if (visibleSidebars.left) {
return setVisibleSidebars({ ...visibleSidebars, left: false }) return setVisibleSidebars({ ...visibleSidebars, left: false })
} }
@ -129,6 +130,7 @@ export const Application: React.FC<ApplicationProps> = (props) => {
right: true right: true
}) })
} }
}
}) })
useEffect(() => { useEffect(() => {