Make React Spring respect animation preferences (#35018)

This commit is contained in:
Echo 2025-06-11 18:51:55 +02:00 committed by GitHub
commit 3aed93711c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 14 additions and 30 deletions

View file

@ -27,7 +27,7 @@ import { Audio } from 'mastodon/features/audio';
import { CharacterCounter } from 'mastodon/features/compose/components/character_counter';
import { Tesseract as fetchTesseract } from 'mastodon/features/ui/util/async-components';
import { Video, getPointerPosition } from 'mastodon/features/video';
import { me, reduceMotion } from 'mastodon/initial_state';
import { me } from 'mastodon/initial_state';
import type { MediaAttachment } from 'mastodon/models/media_attachment';
import { useAppSelector, useAppDispatch } from 'mastodon/store';
import { assetHost } from 'mastodon/utils/config';
@ -110,7 +110,7 @@ const Preview: React.FC<{
left: `${x * 100}%`,
top: `${y * 100}%`,
},
immediate: reduceMotion || draggingRef.current,
immediate: draggingRef.current,
});
const media = useAppSelector((state) =>
(