Skip to content
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

fix(android): prevent error while navigation back after using page tr… #10439

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

farfromrefug
Copy link
Collaborator

…ansition

When navigating transition is set on the currentEntry but never cleaned up
which means that on a next navigation forward (without transition) and back
we will go in androidFragmentTransactionCallback with a transition from currentEntry but no state

This is not the perfect fix as the best one would be to clear transition on navigation end. But it is working already

@cla-bot cla-bot bot added the cla: yes label Nov 13, 2023
import { Screen } from '../../platform';
import { ExpandedEntry } from '../frame/fragment.transitions.android';
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can avoid using android-specific path and import module directly from fragment.transitions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@CatchABus I LL look but I am not sure ExpandedEntry is exported outside of android

Copy link
Contributor

Choose a reason for hiding this comment

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

In these cases @farfromrefug it's best to add a stub interface for ExpandedEntry in a fragment.transitions.d.ts to avoid platform specific imports in bundled code like this.

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

Successfully merging this pull request may close these issues.

None yet

3 participants