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,13 +121,15 @@ export const Application: React.FC<ApplicationProps> = (props) => {
}) })
}, },
onSwipedLeft: () => { onSwipedLeft: () => {
if (visibleSidebars.left) { if (isGuildsChannelsPath(path)) {
return setVisibleSidebars({ ...visibleSidebars, left: false }) if (visibleSidebars.left) {
return setVisibleSidebars({ ...visibleSidebars, left: false })
}
setVisibleSidebars({
...visibleSidebars,
right: true
})
} }
setVisibleSidebars({
...visibleSidebars,
right: true
})
} }
}) })