New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Setting up account" screen #1149
Conversation
… set up the Dagger SessionScope. This allow to inject objects with SessionScope in the node `LoggedInFlowNode` and all it's dependency (in my case `FtueState` and `MatrixClient`)
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #1149 +/- ##
===========================================
- Coverage 56.90% 56.87% -0.04%
===========================================
Files 1033 1039 +6
Lines 26736 26812 +76
Branches 5523 5544 +21
===========================================
+ Hits 15215 15248 +33
- Misses 9136 9168 +32
- Partials 2385 2396 +11
☔ View full report in Codecov by Sentry. |
Fix an issue reported by Sonar.
|
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.
I have no idea why those 2 files have been renamed...
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.
LGTM, just a few minor comments.
import kotlinx.parcelize.Parcelize | ||
|
||
@ContributesNode(AppScope::class) | ||
class LoggedInAppScopeFlowNode @AssistedInject constructor( |
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.
There was some documentation added as a commit message, but I'd also add it here as docs.
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.
Done
} | ||
|
||
private fun SessionId.toKey(): String { | ||
// Hash the sessionId to get ride of exotic char and take only the first 16 chars, |
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.
Nit (typo): it should be rid
here, not ride
.
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.
Good catch, thanks, done.
/** | ||
* Convert a string to an [AnnotatedString] with colored end period if present. | ||
*/ | ||
fun withColoredPeriod( |
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.
If this is used only in SunsetPage
I'd move it there instead, since it seems quite specific. WDYT?
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.
Yes, maybe, but I prefer to keep it here, and extend it if necessary for future use. For instance, pass a list of char that should be colored (?
, !
, etc.) and pass the color as parameter.
Kudos, SonarCloud Quality Gate passed! |
I think it would make sense to tell the user whether they can close the app and come back later or not |
Type of change
Content
SunsetPage
fromWaitListView
to resuse the same composable forMigrationScreenView
.LoggedInAppScopeFlowNode
to be able to inject object with SessionScope inLoggedInFlowNode
The hashed UserId is stored in the SharedPref to avoid showing this screen twice. Note that this is only local and the screen can be shown even if the sliding sync proxy has done an init sync of the account already. Clearing the cache from the developer setting also delete this information (for testing purpose). Note that when getting the app upgrade, this screen will be displayed for a short time (i.e. this screen is not only displayed just after a user log in). This is fine I think, since the app is not in prod yet.
Motivation and context
Closes #1145
Screenshots / GIFs
See the screenshot of the new screen in the file diff.
The screen is shown the first time the user log in, but not the second time:
Tests
Tested devices
Checklist