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

Presenter not destroyed when necessary #216

Open
SamKotlinFisher opened this issue Aug 6, 2018 · 1 comment
Open

Presenter not destroyed when necessary #216

SamKotlinFisher opened this issue Aug 6, 2018 · 1 comment

Comments

@SamKotlinFisher
Copy link

Hi. I have a problem with moxy-presenter (PresenterType == PresenterType.LOCAL). It is not destroyed after fragment-onDestroy. I use FragmentManager.saveFragmentInstanceState method in my application logic and it affects presenter lifecycle. Steps to reproduce:

  1. call FragmentManager.saveFragmentInstanceState to save fragment A state (MvpAppCompatFragment changes mIsStateSaved flag)
  2. replace fragment A with fragment B
  3. fragment A is destroyed but presenter still alive due to mIsStateSaved

In this case presenter should be destroyed since there are no views attached to it. Could you please advice how to solve this issue?

@Motoaleks
Copy link

Same problem. Did you find any solution?

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