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

Question: Check if back stack is empty #138

Open
emartynov opened this issue Jan 25, 2021 · 2 comments
Open

Question: Check if back stack is empty #138

emartynov opened this issue Jan 25, 2021 · 2 comments

Comments

@emartynov
Copy link

I can not find an easy way to get from the router if there is something in the back stack to pop.

@terrakok
Copy link
Owner

Yes, it's true cause router doesn't have direct access to navigator which works with fragment manager.
Navigator lives in UI lifecycle and can be destroyed any time.
Router is independent from UI lifecycle.

But if it necessary I can add Router.getCurrentStackSize(): Int? method which returns null when navigator does not available. What do you think?

@aziko19
Copy link

aziko19 commented Apr 13, 2023

when are you going to add this @terrakok . It's been 2 years already.

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

No branches or pull requests

3 participants