Closed uvaysss closed 3 years ago
But I'm getting an incorrect behavior, all the fragments from the history are shown at the same time.
That shouldn't happen as long as the keys are each data class
(and therefore have a stable equals/hashCode/toString). 🤔
Are all of your keys data class
?
Yes, they are data class
.
But I've noticed that if I make a delay before history change like Handler.post {}
than it works correct.
Oh, I should be calling fragmentManager.executePendingTransactions()
on the first line, and then probably apply the safety measures which is basically Handler.post {}
that I also ended up adding to simple-stack-extensions
Valid find, I'll update it accordingly.
Thanks!
Thank you for your quick response!
Hi, I'm using your multistack implementation from sample, but having trouble by implementing some tricky navigation behavior. The case is that I need to navigate to a fragment that is in another stack. I'm trying to accomplish this by first selecting the stack and then setting history:
Multistack.setSelectedStack(identifier)
Multistack.getSelectedStack().setHistory()
But I'm getting an incorrect behavior, all the fragments from the history are shown at the same time. I tried to call
Multistack.executePendingStateChange()
before setting the history, but the result is the same.