-
Notifications
You must be signed in to change notification settings - Fork 205
Description
Hi! I have an Activity with view pager. In view pager I show one fragment (one - because it's an example) with FragmentPagerAdapter. In this one fragment I inject presenter using Dagger. In phone developer settings I enable Not save activity state option. Now when I press home button activity and fragment are destroyed, but presenter not and when I came back to the app two instance of presenter is created: one - the old and one - new is injected. But if I add mvpDelegate.onDestroy() in fragments onDestroy the presenter is destroyed, new instance is injected and there is no old presenter instance.
There is a lot of code to paste. I've created a sample project to show this issue. Run it and see log after destroy and resume. But before go to settings and enable Not save activity state option.
Link to project: https://github.com/bitvale/MoxyIssue