Skip to content

Releases: Zhuinden/simple-stack

Simple Stack 2.3.2

11 Apr 11:42
Compare
Choose a tag to compare

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

30 Mar 22:54
Compare
Choose a tag to compare

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

27 Feb 14:20
Compare
Choose a tag to compare

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

18 Feb 21:51
Compare
Choose a tag to compare

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

30 Jan 00:41
Compare
Choose a tag to compare

Simple-Stack 2.2.4 (2020-01-30)

  • UPDATE: state-bundle is updated to 1.2.2.

Simple Stack 2.2.3

22 Jan 23:15
Compare
Choose a tag to compare

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

17 Jan 00:25
Compare
Choose a tag to compare

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

12 Jan 09:08
Compare
Choose a tag to compare

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

30 Dec 15:37
Compare
Choose a tag to compare

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.

Simple-Stack 2.1.2

10 Oct 15:06
Compare
Choose a tag to compare

Simple Stack 2.1.2 (2019-10-10)

  • BEHAVIOR CHANGE: The navigation operations goBack(), replaceTop(), jumpToRoot(), goUp(), goUpChain(), and goTo() (when going to existing element) are now considered "terminal" operations.

Terminal operation means that actions (that are not setHistory) called on the Backstack are ignored while the state change of the terminal action has not been completed yet.

This is done to eliminate the possibility of enqueueing incorrect "forward" navigation immediately when a "back" navigation is happening, that could potentially create "illegal" navigation history.

Illegal navigation history is a problem when using implicit scopes, as with the right button mashing, you could potentially "skip" an expected screen, and not have registered its services.

Therefore, the possibility of this scenario is now blocked.