From e90cfbd33f6fa67c91a6cc694a2df65823c258bf Mon Sep 17 00:00:00 2001 From: Azat Galiullin Date: Thu, 21 Mar 2019 16:12:02 +0300 Subject: [PATCH] fix detaching and destroying presenter in ViewGroup after view added to container again. --- .../mosby3/mvp/delegate/ViewGroupMvpDelegateImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mvp/src/main/java/com/hannesdorfmann/mosby3/mvp/delegate/ViewGroupMvpDelegateImpl.java b/mvp/src/main/java/com/hannesdorfmann/mosby3/mvp/delegate/ViewGroupMvpDelegateImpl.java index 20ca480b..272025ed 100644 --- a/mvp/src/main/java/com/hannesdorfmann/mosby3/mvp/delegate/ViewGroupMvpDelegateImpl.java +++ b/mvp/src/main/java/com/hannesdorfmann/mosby3/mvp/delegate/ViewGroupMvpDelegateImpl.java @@ -107,6 +107,7 @@ protected P createViewIdAndCreatePresenter() { mosbyViewId = UUID.randomUUID().toString(); PresenterManager.putPresenter(PresenterManager.getActivity(context), mosbyViewId, presenter); } + presenterDestroyed = false; return presenter; } @@ -167,6 +168,7 @@ protected P createViewIdAndCreatePresenter() { delegateCallback.setPresenter(presenter); presenter.attachView(view); + presenterDetached = false; /* if (viewStateWillBeRestored) {