1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
Respect system's reduced motion enabled setting
This commit is contained in:
xmflsct
2022-12-09 00:48:34 +01:00
parent 4a28d47b41
commit 44f83e44b9
3 changed files with 15 additions and 12 deletions

View File

@ -1,6 +1,10 @@
import { LayoutAnimation } from 'react-native'
import { AccessibilityInfo, LayoutAnimation } from 'react-native'
const layoutAnimation = async () => {
const disable = await AccessibilityInfo.isReduceMotionEnabled()
if (disable) return
const layoutAnimation = () =>
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
}
export default layoutAnimation