Skip to content

Releases: Zhuinden/simple-stack

Simple Stack 2.4.0

Choose a tag to compare

@Zhuinden Zhuinden released this 08 Jul 18:06

Simple-Stack 2.4.0 (2020-07-08)

  • SIGNATURE CHANGE: GlobalServices.Factory now receives Backstack parameter in create(). (#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's create() method was non-null, but @Nonnull was missing.

  • MINOR FIX: Adding the Backstack from serviceBinder.getBackstack() with addService() would cause a loop in toBundle(). Now it explicitly throws IllegalArgumentException instead 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.0 for default scoping and default fragment behaviors.

  • ADD: GlobalServices.SCOPE_TAG to make it possible to see the scope tag of global services without relying on internals.

Simple Stack 2.3.2

Choose a tag to compare

@Zhuinden Zhuinden released this 11 Apr 11:42

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

Choose a tag to compare

@Zhuinden Zhuinden released this 30 Mar 22:54

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

Choose a tag to compare

@Zhuinden Zhuinden released this 27 Feb 14:20

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 either android.support.* or androidx.*.

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 with javax.annotation.*).

With these changes, Jetifier should no longer be needed when using Simple-Stack.

Simple Stack 2.2.5

Choose a tag to compare

@Zhuinden Zhuinden released this 18 Feb 21:51

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 uses getSavedState to re-use (or create) the existing one.

  • FIX: Ensure that backDispatchedServices is also cleared after execution of dispatchBack.

Simple Stack 2.2.4

Choose a tag to compare

@Zhuinden Zhuinden released this 30 Jan 00:41

Simple-Stack 2.2.4 (2020-01-30)

  • UPDATE: state-bundle is updated to 1.2.2.

Simple Stack 2.2.3

Choose a tag to compare

@Zhuinden Zhuinden released this 22 Jan 23:15

Simple-Stack 2.2.3 (2020-01-23)

  • FIX: ScopedService.Activated callback could immediately execute a navigation action, which if destroyed the current scope, then it could result in an AssertionError (#215).

  • ADD: SimpleStateChanger for convenience when a StateChanger is not intended to take asynchronous execution into account.

Simple Stack 2.2.2

Choose a tag to compare

@Zhuinden Zhuinden released this 17 Jan 00:25

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

Choose a tag to compare

@Zhuinden Zhuinden released this 12 Jan 09:08

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

Choose a tag to compare

@Zhuinden Zhuinden released this 30 Dec 15:37

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 its BackstackDelegate/Navigator equivalent.

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 calls finalizeScopes() first to ensure that scoped services are also properly reset.