-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The animation don't move #946
Comments
What do you mean? Can you please send us a reproducible code or video for this issue? |
No problem! My phone is i13mini. Use expo-go app to preview it. thank you to reply my question! |
Are you using it in a modal? |
No! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hey @weiawesome |
I remember don't switch the darkness mode after into the app then the bug will not exist in IOS. |
@syou98 @weiawesome you can try something like that: const ref = useRef<LottieView>(null);
const resetLottie = useCallback((state: AppStateStatus) => {
if (state === 'active') {
ref.current?.reset();
ref.current?.play();
}
}, [ref]);
useEffect(() => {
const subscriber = AppState.addEventListener('change', resetLottie);
return () => {
subscriber.remove();
};
}, []);
return (
<LottieView
ref={ref}
{...props}
/>
); This will reset your lottie animation when you'll get back to the app. |
Is this issue still a problem with the latest version (6.5.1)? I can take a look (Reminder: Expo Go is still using the old 5.1.6 version of Lottie so please don't test this against Expo Go) |
Description
[Description of the bug]
Steps to Reproduce
In short, I found that I used the app in dark mode it would stop.
(In IOS.)
later I will test Android, thanks.
And if I turn off the dark mode, it will work again(be ok)
Expected behavior: move
Actual behavior: don't move
Versions
"react-native": "0.69.6",
"lottie-react-native": "^5.1.4",
The text was updated successfully, but these errors were encountered: