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

Unexpected lifecycle after pushing a Controller while app is in background #560

Open
ursusursus opened this issue Sep 1, 2019 · 2 comments

Comments

@ursusursus
Copy link

Hi, If I add a Controller while app is paused, the lifecycle of the pushed Controller is in my opinion wrong / unexpected.

I add it via this, and hit home button before somethingAsync callback is called

Activity {
    fun onCreate() {
          somethingAsync {
             router.pushController(..)
          }
     }
}

Observed lifecycle:

ctor
onCreateView
onDestroyView
onAttach

I'd never expect attached controller to have null view. Is this by design?

@sdelaysam
Copy link

@ursusursus it works as expected for me.

onActivityPaused
Controller1 onDetach
onActivityStopped
Controller1 onSaveInstanceState
// Push Controller2
Controller2 onCreateView
Controller2 onAttach (view != null)
Controller1 onDestroyView

@ursusursus
Copy link
Author

Well, it doesnt for me. Ill try to get a sample project

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

No branches or pull requests

2 participants