-
Notifications
You must be signed in to change notification settings - Fork 731
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
[Devices Management] Refactor some code to improve testability (PSG-701) #7044
Conversation
0ed1673
to
b91def8
Compare
eb59a53
to
682905d
Compare
b91def8
to
2592bc3
Compare
} | ||
|
||
private fun removeVerificationListener() { | ||
activeSessionHolder.getSafeActiveSession() |
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 to see getSafeActiveSession()
here.
return CurrentSessionCrossSigningInfo( | ||
deviceId = deviceId, | ||
isCrossSigningInitialized = mxCrossSigningInfo.getOrNull() != null, | ||
isCrossSigningVerified = mxCrossSigningInfo.getOrNull()?.isTrusted() == true |
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 like to use mxCrossSigningInfo.getOrNull()?.isTrusted().orFalse()
but of course this is ok too.
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.
Thanks for the suggestion. I have done the update, I prefer also using the extension method. Updated in 98ca432
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! Nice cleanup and happy to see lots of tests.
2592bc3
to
98ca432
Compare
9c49ff9
to
45b138e
Compare
SonarCloud Quality Gate failed. |
Type of change
Content
Creating a new clean and tested
DevicesViewModel
inside the V2 package. Domain layer code has been encapsulated inside UseCases with unit tests.All the code related to the new device management version has been move inside the V2 package.
Motivation and context
Closes #7043
Screenshots / GIFs
Tests
Tested devices
Checklist