Releases: sockeqwe/mosby
3.1.1
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'
3.1.0
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
3.0.4
Minor improvement in MviBasePresenter
to change the internal order how intent()
and subscribeViewState()
are constructing the observable stream #242
This 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.
3.0.3
3.0.2
3.0.1
-
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
3.0.0
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!
2.0.1
2.0.0
- 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 RestoreableViewState to
RestorableViewState
and RestoreableParcelableViewState toRestorableParcelableViewState
- update to support lib 23.0.1
- updated compile SDK and target SDK to Marshmallow (API 23)
1.3.1
- 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.