val savedState = backstack.getSavedState(previousKey)
Navigator.persistViewToState(previousView)
backstack.getSavedState(previousKey).setBundle(savedState.getBundle())
Terrible and unexpected, though nobody has ever asked about it (probably because more people use fragments than the view-helper APIs, AND nobody ever thought about using getSavedState for this sort of thing) so I can treat it as a regular bug fix rather than behavior change. 🤔
https://github.com/Zhuinden/simple-stack/blob/7d51efbf2fe393651b2bb4a70f5afa2671c64e1c/simple-stack/src/main/java/com/zhuinden/simplestack/Backstack.java#L618-L623
My comment from almost a year ago says "oh I should fix this later"
https://github.com/Zhuinden/simple-stack/issues/153#issuecomment-473483498
Fixing things typically involves remembering them, so now there is an issue for it.
If one were to use
SavedState
for result passing (see https://github.com/Zhuinden/simple-stack/issues/216), this could result in a tricky API:Terrible and unexpected, though nobody has ever asked about it (probably because more people use fragments than the view-helper APIs, AND nobody ever thought about using
getSavedState
for this sort of thing) so I can treat it as a regular bug fix rather than behavior change. 🤔