Releases: Zhuinden/simple-stack
Release list
Simple Stack 2.4.0
Simple-Stack 2.4.0 (2020-07-08)
- SIGNATURE CHANGE:
GlobalServices.Factorynow receivesBackstackparameter increate(). (#231)
I'm aware this is technically "breaking", but the effect should be minor, and hopefully shouldn't cause problems.`
The Backstack cannot be added as a service directly, but it can be added as an alias.
-
FIX:
GlobalServices.Factory'screate()method was non-null, but@Nonnullwas missing. -
MINOR FIX: Adding the
BackstackfromserviceBinder.getBackstack()withaddService()would cause a loop intoBundle(). Now it explicitly throwsIllegalArgumentExceptioninstead sooner (not reported before). -
DEPRECATED:
backstack.removeAllStateChangeCompletionListeners(). This was added "for convenience", but in reality it is not a good/safe API, and it should not exist. -
UPDATE: Create and release
simple-stack-extensions:2.0.0for default scoping and default fragment behaviors. -
ADD:
GlobalServices.SCOPE_TAGto make it possible to see the scope tag of global services without relying on internals.
Simple Stack 2.3.2
Simple-Stack 2.3.2 (2020-04-11)
- FIX: Bug introduced in 2.3.1, using
backstack.removeAllStateChangeCompletionListeners()would remove an internal completion listener and therefore scope activation callbacks would stop being dispatched.
Simple Stack 2.3.1
Simple-Stack 2.3.1 (2020-03-31)
- FIX: Ensure that if multiple navigation actions are enqueued, then scope activation dispatch only occurs for the final state change, instead of potentially running into an AssertionError. (#220, thanks @valeriyo)
If you use either ScopeKey or ScopeKey.Child, it is advised to update, and get this bugfix.
Simple Stack 2.3.0
Simple-Stack 2.3.0 (2020-02-27)
- CHANGE: Remove dependency on
android.support.annotation.*. With that, there should be no dependency from the library on eitherandroid.support.*orandroidx.*.
Replaced it using javax.annotation.Nullable and javax.annotation.Nonnull provided by api("com.google.code.findbugs:jsr305:3.0.2").
- UPDATE: state-bundle is updated to 1.3.0 (Remove dependency on
android.support.annotation.*, replace withjavax.annotation.*).
With these changes, Jetifier should no longer be needed when using Simple-Stack.
Simple Stack 2.2.5
Simple-Stack 2.2.5 (2020-02-18)
-
CHANGE:
Backstack.getSavedState(Object key).getBundle()is now initialized to an empty StateBundle instead of null (but is still nullable because of setBundle()). -
FIX:
Backstack.persistViewToState(Object key)no longer creates a new SavedState instance, and usesgetSavedStateto re-use (or create) the existing one. -
FIX: Ensure that
backDispatchedServicesis also cleared after execution ofdispatchBack.
Simple Stack 2.2.4
Simple-Stack 2.2.4 (2020-01-30)
- UPDATE:
state-bundleis updated to 1.2.2.
Simple Stack 2.2.3
Simple-Stack 2.2.3 (2020-01-23)
-
FIX:
ScopedService.Activatedcallback could immediately execute a navigation action, which if destroyed the current scope, then it could result in anAssertionError(#215). -
ADD:
SimpleStateChangerfor convenience when aStateChangeris not intended to take asynchronous execution into account.
Simple Stack 2.2.2
Simple-Stack 2.2.2 (2020-01-17)
- FIX: Ensure that unused keys can be GCed inside ScopeManager (previously they could be kept alive in a map, #213).
Simple-Stack 2.2.1
Simple Stack 2.2.1 (2020-01-12)
- FIX: The explicit parent scope chain was not always resolved correctly if a key is only a ScopeKey.Child, but not a ScopeKey, and the key did not register any new scopes (as all scopes defined by the ScopeKey.Child had already been registered by previous keys).
This could provide incorrect results in findScopesForKey(key, EXPLICIT), and could skip a HandlesBack service in the current top key's explicit parent chain.
Simple-Stack 2.2.0
Simple-Stack 2.2.0 (2019-12-30)
- ADDED:
ScopedService.HandlesBack.
When a service implements HandlesBack, then when Backstack.goBack() is called, it is first dispatched across the current active explicit scope chain.
This allows handling "back", without having to dispatch it through the active view hierarchy (in order to get access to it in scoped services).
- FIX:
Backstack.moveToTop()did not re-order the scope hierarchy according to the new active keys (as the scope order depended on construction order, but existing scopes were not recreated).
This could have been a problem if services used the same name across multiple scopes, and the keys were re-ordered in place (not add/remove).
- ADDED:
Backstack.setGlobalServices(GlobalServices.Factory)and itsBackstackDelegate/Navigatorequivalent.
This allows delaying the instantiation of services when the global scope is actually being created, rather than providing them immediately.
Please note that providing a GlobalServices.Factory will override whatever GlobalServices was previously set.
Also note that the GlobalServices.Factory should not be an anonymous inner class / lambda / inner class, as it is kept for configuration changes.
- DEPRECATED:
BackstackDelegate.
With the renaming of BackstackManager to Backstack in 2.0.x, it's become easier to use Backstack directly than juggling the BackstackDelegate.
Also, using Navigator with Fragments seems to have no side-effects, therefore this is now the preferred approach (since setting a non-default state changer calls setShouldPersistContainerChild(false), also since 2.0.x).
Therefore, using Navigator is now preferred over BackstackDelegate.
- FIX:
Backstack.forceClear()now callsfinalizeScopes()first to ensure that scoped services are also properly reset.