Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

How to specify the order of back press handlers? #35

Closed
evjava opened this issue Feb 12, 2022 · 0 comments
Closed

How to specify the order of back press handlers? #35

evjava opened this issue Feb 12, 2022 · 0 comments

Comments

@evjava
Copy link

evjava commented Feb 12, 2022

I want to specify the order of handlers like follows:

  1. close drawer (if open)
  2. close search (if expanded)
  3. handle backpress by component (if can)
  4. router.pop
  5. handle double-press (first press for toast "press twice to exit", second quick press for exit)

I can implement all these handlers, but I don't understand, how to tangle them together in correct order.

Is there some API to do it? As I see, the order isn't specified, moreover, router calls pop after other handlers.

Sub question: is it possible to access router.backstackSize from outside? Probably it can help me.

Repository owner locked and limited conversation to collaborators Feb 12, 2022
@arkivanov arkivanov converted this issue into discussion #36 Feb 12, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant