Changelog History
-
v3.1.1 Changes
December 17, 2018π Minor release for better support with jetifier and androidx
Solves:
BackstackAccessor.isFragmentOnBackStack(Fragment())
Crash:
java.lang.IllegalAccessError: Method 'boolean androidx.fragment.app.Fragment.isInBackStack()' is inaccessible to class 'androidx.core.app.BackstackAccessor' -
v3.1.0 Changes
November 28, 2017β Added
MvpQueueingBasePresenter
: This Presenter has a methodonceViewAttached(ViewAction)
that internally queues allViewAction
if no view is attached to this presenter and executes all queued actions once a view is attached. If a view is attached, the ViewAction executes immediately. This class is useful in MVP powered apps with backstack navigation.
π Changes
MvpPresenter.detachView(boolean retainInstance)
is now split in two methods:detachView()
: Was the same asdetachView(retainInstance = true)
destroy()
: Was the same asdetachView(retainInstance = false)
Please note thatdestroy()
is called when the corresponding View is also destroyed permanently. For example, if FragmentA (View) has PresenterA. Once we push a new Fragment B (with Presenter B) on top of the stack,PresenterA.detachView()
is called because View of FragmentA is destroyed temporarily.
π Deprecations
- π
MvpPresenter.detachView(boolean retainInstance)
is deprecated now. UsedetachView()
anddestroy()
. - π
MvpBasePresenter.getView()
andMvpBasePresenter.isViewAttached()
are deprecated. UseMvpBasePresenter.ifViewAttached(ViewAction)
, see #233
-
v3.0.4 Changes
May 15, 2017Minor improvement in
MviBasePresenter
to change the internal order howintent()
andsubscribeViewState()
are constructing the observable stream #242This means internal ViewState-BehaviorSubject is constructed first and then Intent-PublishSubjects are constructed. This ensures that every intent() which emits early like
Observable.just(...)
is received by ViewState. However, this also means that you should not invoke an intent from view.render() (or whatever method your viewstate subscriber is) because MviBasePresenter might not be subscribed to the intent() yet.So if you ever face such a use case that you have to trigger an intent from view.render() please file an issue on github's issue tracker.
-
v3.0.3 Changes
April 20, 2017- π Fix #240 : Accidentially Findbugs annotations has been packaged into
aar
which caused issues with proguard.
- π Fix #240 : Accidentially Findbugs annotations has been packaged into
-
v3.0.2 Changes
March 31, 2017- π Fixes #231
- π Fixes a potential memory leak with
MvpActivity
andMvpViewStateActivity
-
v3.0.1 Changes
March 30, 2017π Fixes #229: Adds
View.isInEditMode()
check to support Android Studio's layout editor for custom ViewGroups powered MVI or MVP. This means that there is a breaking API change in constructor ofViewGroupMviDelegateImpl
,ViewGroupMvpDelegeateImpl
andViewGroupMvpViewStateDelegateImpl
(constructor now requires 3 parameters).Some minor javadoc improvements
-
v3.0.0 Changes
March 11, 2017π New (Public API):
- Model-View-Intent (MVI) Module:
com.hannesdorfmann.mosby3:mvi:3.0.0
π New (Internal usage only):
- π mvi-common Module (internal usage only). Common interfaces for MVI (shared with conductor Mosby plugin)
- PresenterManager Module (internal usage only): Is used internally by MVP and MVI to keep presenters during screen orientation changes, back stack navigation etc.
- utils-fragment Module (internal usage only): Is used internally to determine if a Fragment is on back stack or not.
π Changes:
- Package name has been changed from
com.hannesdorfmann.mosby
tocom.hannesdorfmann.mosby3
(note the 3 at the end). Just update your import statements to migrate to Mosby 3.0: In Android Studio doEdit -> Find -> Replace in Path ...
and set findimport com.hannesdorfmann.mosby
replace withimport com.hannesdorfmann.mosby3
. - π Moved
MvpBasePresenter
frommvp-common
module intomvp
module - π
MvpNullObjectBasePresenter
has been moved into own module:com.hannesdorfmann.mosby3:mvp-nullobject-presenter:3.0.0
MvpNullObjectBasePresenter
: getView() is has now protected visibility and uses WeakReference internally- π Moved LCE (Loading-Content-Error) related classes into own module:
com.hannesdorfmann.mosby3: mvp-lce:3.0.0
MvpActivity
,MvpFragment
, etc. no longer have methods likeisRetainInstance()
,setRetainInstance()
andshouldInstanceBeRetained()
. This functionality is now part of the corresponding delegate such asActivityMvpDelegate
,FragmentMvpDelegate
etc.- π Some Mosby internal fixes / improvements.
π Deprecations:
- π Deprecated
ArrayListLceViewState
andCastedArrayListLceViewState
. UseParcelableListLceViewState
instead.
β Removed:
- β Removed
MvpViewStateViewGroupDelegateCallback
- β Removed mvp testing module
- β Removed deprecated
RetainingFragmentLceViewState
(deprecated in Mosby 2.0). UseRetainingLceViewState
.
Thanks to all contributors!
- Model-View-Intent (MVI) Module:
-
v2.0.1 Changes
February 20, 2016 -
v2.0.0 Changes
September 04, 2015- π Kotlin support
- Retaining Activities #64
- β Removed
core-module
:MosbyActivity
andMosbyFragment
. This means that there is no more Butterknife, Icepick and FragmentArgs integration out of the box. That is something every developer should do by itβs own. #63 - β Removed
core-dagger1
,mvp-dagger1
andviewstate-dagger1
. So no more dagger 1 support out of the box. #63 - β Removed rx module and retrofit module #63
- splitting
isRetainingInstance()
method intoisRetainInstance()
andshouldInstanceBeRetained()
to avoid bugs. - π Deprecated
RetainingFragmentLceViewState
, useRetainingLceViewState
instead - π Renamed
MvpDelegateCallback
toBaseMvpDelegateCallback
and introducedActivityMvpDelegateCallback
to implement retaining Activities with retaining presenters #64 - π Renamed
MvpViewStateDelegateCallback
toBaseMvpDelegateCallback
for retaining Activities with retaining presenter and viewstate #64 - Renamed Restor e ableViewState to
RestorableViewState
and Restor e ableParcelableViewState toRestorableParcelableViewState
- β‘οΈ update to support lib 23.0.1
- β‘οΈ updated compile SDK and target SDK to Marshmallow (API 23)
-
v1.3.1 Changes
September 01, 2015- π Bugfix: split method
isRetainingInstance()
into two methods:isRetainInstance()
andshouldInstanceBeRetained()
π This might be the last
1.x
release containing.2.0
will be released very soon containing some serious changes with integration of third party libraries like Butterknife, FragmentArgs and IcePick. - π Bugfix: split method