mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
[Glitch] Prevents swiping when zoomed in
Port 4bae3da85c to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -114,6 +114,11 @@ export const MediaModal: FC<MediaModalProps> = forwardRef<
|
||||
|
||||
const bind = useDrag(
|
||||
({ active, movement: [mx], direction: [xDir], cancel }) => {
|
||||
// Disable swipe when zoomed in.
|
||||
if (zoomedIn) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If dragging and swipe distance is enough, change the index.
|
||||
if (
|
||||
active &&
|
||||
|
||||
Reference in New Issue
Block a user