Use media query to detect touchscreens

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-02-07 17:33:22 +01:00
parent ebf48dd830
commit 5e801b899d
5 changed files with 12 additions and 29 deletions

View File

@ -15,7 +15,7 @@ import PlaceholderStatus from 'soapbox/features/placeholder/components/placehold
import Thread from 'soapbox/features/status/components/thread';
import Video from 'soapbox/features/video';
import { useAppDispatch, useAppSelector } from 'soapbox/hooks';
import { isUserTouching } from 'soapbox/is-mobile';
import { userTouching } from 'soapbox/is-mobile';
import { makeGetStatus } from 'soapbox/selectors';
import ImageLoader from '../image-loader';
@ -104,7 +104,7 @@ const MediaModal: React.FC<IMediaModal> = (props) => {
const getIndex = () => index !== null ? index : props.index;
const toggleNavigation = () => {
setNavigationHidden(value => !value && isUserTouching());
setNavigationHidden(value => !value && userTouching.matches);
};
const handleStatusClick: React.MouseEventHandler = e => {