Skip to content

fix(Android): closing animation on preloaded screen #2945

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

Conversation

maciekstosio
Copy link
Contributor

@maciekstosio maciekstosio commented May 27, 2025

Fixes #2940

Description

When user goes to preloaded screen closing animation can be observed. It's because we're changing current top, but going to the screen that's already in the stack. Unfortunately the change of activityState is independent as it's a prop. So, when we determine that the screen was already on stack, we don't know that it just changed to active from inactive.

Changes

This PR filters out inactive screens in stack, so it doesn't keep track of preloaded screens.

Screenshots / GIFs

Before After
2940-before.mov
2940-after.mov

Test code and steps to reproduce

See Test2940.tsx

  • Included code example that can be used to test this change
  • Ensured that CI passes

@maciekstosio maciekstosio requested review from kkafar and kligarski May 27, 2025 10:27
Copy link
Contributor

@kligarski kligarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maciekstosio
Copy link
Contributor Author

Superseded by #3062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native stack preload in combination with useEffect places the screens in the wrong order into the stack
2 participants