-
Notifications
You must be signed in to change notification settings - Fork 104
[WIP] Select a start screen based upon datastore state. #169
Conversation
53752c5
to
7837587
Compare
RouteActions will be generated by the route presenter, in response to DataStore observables.
7837587
to
cf32395
Compare
Ok!!! I've taken a look at the integration tests & identified a few things that are going on here. The fixes / changes I've implemented are kind of hacky, so I'm going to push them up in a separate branch and you can take a look at them before you decide what you'd like to incorporate @jhugman . I think my lack of expertise with the nav graph stuff is hindering getting this 💯 over the finish line, but I have at least introduced a new set of failures!! Maybe this will give you some ideas :) Solutions:I disabled animations in the tests by setting Re-populating the item list when using in-memory Logins storageAll of the tests related to the ItemDetail screen were failing because after we Removing
|
Will rebase against latest version, test, and then get reviewed... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick review: Code-wise looks great :) I was not able to see it working, maybe because of the sync issue. The list was not displayed and Lock Now was not displaying Lock screen.
dispatcher.dispatch(RouteAction.FingerprintDialog) | ||
} else { | ||
unlockFallback() | ||
when { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
} | ||
} | ||
.addTo(compositeDisposable) | ||
|
||
lockedStore.onAuthentication | ||
.filterByType(FingerprintAuthAction.OnAuthentication::class.java) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
@@ -139,22 +157,22 @@ class RoutePresenter( | |||
// This maps two nodes in the graph_main.xml to the edge between them. | |||
// If a RouteAction is called from a place the graph doesn't know about then | |||
// the app will log.error. | |||
when (Pair(from, to)) { | |||
Pair(R.id.fragment_welcome, R.id.fragment_fxa_login) -> return R.id.action_welcome_to_fxaLogin | |||
return when (Pair(from, to)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
@@ -62,6 +63,7 @@ open class DataStore( | |||
is DataStoreAction.Lock -> lock() | |||
is DataStoreAction.Unlock -> unlock() | |||
is DataStoreAction.Sync -> sync() | |||
is DataStoreAction.Reset -> reset() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset Action is only for test purpose? Did not see it dispatched from anywhere else beside test.
Closing in favour of a new one. |
Fixes #144
Fixed #239
Depends on #22
Depends on #68
This PR continues to split up the graph into subgraphs, but starts sending UI actions through the DataStore.