Skip to content

Releases: sockeqwe/mosby

3.1.1

17 Dec 16:14
Compare
Choose a tag to compare

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

28 Nov 14:20
Compare
Choose a tag to compare

Added

  • MvpQueueingBasePresenter: This Presenter has a method onceViewAttached(ViewAction) that internally queues all ViewAction 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 as detachView(retainInstance = true)
    • destroy(): Was the same as detachView(retainInstance = false)
      Please note that destroy() 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. Use detachView() and destroy().
  • MvpBasePresenter.getView() and MvpBasePresenter.isViewAttached() are deprecated. Use MvpBasePresenter.ifViewAttached(ViewAction), see #233

3.0.4

15 May 09:18
Compare
Choose a tag to compare

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

20 Apr 15:11
Compare
Choose a tag to compare
  • Fix #240 : Accidentially Findbugs annotations has been packaged into aar which caused issues with proguard.

3.0.2

31 Mar 09:10
Compare
Choose a tag to compare
  • Fixes #231
  • Fixes a potential memory leak with MvpActivity and MvpViewStateActivity

3.0.1

30 Mar 07:53
Compare
Choose a tag to compare
  • 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 of ViewGroupMviDelegateImpl, ViewGroupMvpDelegeateImpl and ViewGroupMvpViewStateDelegateImpl(constructor now requires 3 parameters).

  • Some minor javadoc improvements

3.0.0

11 Mar 16:44
Compare
Choose a tag to compare

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 to com.hannesdorfmann.mosby3 (note the 3 at the end). Just update your import statements to migrate to Mosby 3.0: In Android Studio do Edit -> Find -> Replace in Path ...
    and set find import com.hannesdorfmann.mosby replace with import com.hannesdorfmann.mosby3.
  • Moved MvpBasePresenter from mvp-common module into mvp 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 like isRetainInstance(), setRetainInstance() and shouldInstanceBeRetained(). This functionality is now part of the corresponding delegate such as ActivityMvpDelegate, FragmentMvpDelegate etc.
  • Some Mosby internal fixes / improvements.

Deprecations:

  • Deprecated ArrayListLceViewState and CastedArrayListLceViewState. Use ParcelableListLceViewState instead.

Removed:

  • Removed MvpViewStateViewGroupDelegateCallback
  • Removed mvp testing module
  • Removed deprecated RetainingFragmentLceViewState (deprecated in Mosby 2.0). Use RetainingLceViewState.

Thanks to all contributors!

2.0.1

20 Feb 17:57
Compare
Choose a tag to compare

Minor update, cleaning up some internals and updating javadocs:

  • #104 Presenter not created if Fragment has no UI
  • #107 Allow non textview errorview in LceAnimator.showErrorView

2.0.0

04 Sep 17:18
Compare
Choose a tag to compare
  • Kotlin support
  • Retaining Activities #64
  • Removed core-module: MosbyActivity and MosbyFragment. 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 and viewstate-dagger1. So no more dagger 1 support out of the box. #63
  • Removed rx module and retrofit module #63
  • splitting isRetainingInstance() method into isRetainInstance() and shouldInstanceBeRetained() to avoid bugs.
  • Deprecated RetainingFragmentLceViewState, use RetainingLceViewState instead
  • Renamed MvpDelegateCallback to BaseMvpDelegateCallbackand introduced ActivityMvpDelegateCallback to implement retaining Activities with retaining presenters #64
  • Renamed MvpViewStateDelegateCallback to BaseMvpDelegateCallback for retaining Activities with retaining presenter and viewstate #64
  • Renamed RestoreableViewState to RestorableViewState and RestoreableParcelableViewState to RestorableParcelableViewState
  • update to support lib 23.0.1
  • updated compile SDK and target SDK to Marshmallow (API 23)

1.3.1

01 Sep 15:45
Compare
Choose a tag to compare
  • Bugfix: split method isRetainingInstance() into two methods: isRetainInstance() and shouldInstanceBeRetained()

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.