-
I want to specify the order of handlers like follows:
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 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello and thanks for the question!
The
Based on what you described, I suggest the following implementation. First, you can avoid passing the
Yes it is possible. Will |
Beta Was this translation helpful? Give feedback.
Hello and thanks for the question!
The
BackPresessedHandler
is part of the Essenty library. And the order is specified in the README file. All registered callbacks are called in reverse order. This reflects the behaviour of the the AndroidX OnBackPressedDispatcher.Based on what you described, I suggest the following implementation. First, you can avoid passing the
handleBackButton
flag to theComponentContext.router(...)
method. This will allow manual back button handling. Next, perhaps you can register just one callback to theBackButtonHandler
…