-
Notifications
You must be signed in to change notification settings - Fork 158
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
Add forced logout flow when the proxy is no longer available #3458
Add forced logout flow when the proxy is no longer available #3458
Conversation
…or the submit action. Also make the title text optional and dismissing the dialog by tapping outside/going back configurable.
…longer available. In that case, display the non-dismissable dialog and force the user to log out after enabling SSS.
1. Always try native/simplified sliding sync login first, if available. 2. Then, if it wasn't available or failed with an sliding sync not supported error, try with the proxy instead (either discovered proxy or forced custom one).
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3458 +/- ##
===========================================
+ Coverage 82.62% 82.63% +0.01%
===========================================
Files 1701 1701
Lines 40015 40047 +32
Branches 4868 4872 +4
===========================================
+ Hits 33061 33092 +31
- Misses 5233 5234 +1
Partials 1721 1721 ☔ View full report in Codecov by Sentry. |
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.
Some remarks, otherwise LGTM
override suspend fun isSlidingSyncProxySupported(): Boolean { | ||
return client.availableSlidingSyncVersions().any { it is SlidingSyncVersion.Proxy } |
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.
Can't this fail?
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.
Apparently not, if the SDK can't load the data (network error, one of the config files not existing...) it just returns an empty list.
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.
Can we try to move logic to the LoggedInPresenter and LoggedInView?
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 can try 🤞 .
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 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.
PR should avoid updating all translations, just the ones you need for your work would be better :)
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.
That's actually what I did, but I had to remove the translations in other languages for a couple of strings that are no longer in the project because otherwise the code quality checks wouldn't pass.
This also allows some extra testing
Quality Gate passedIssues Measures |
Content
MatrixClient.isSlidingSyncProxyAvailable()
function.ErrorDialog
component so it can be made non-dismissable if needed, added a separate submit action from the dismiss one.Motivation and context
Second part of #3427.
Screenshots / GIFs
Tests
This is quite difficult to test unless you either change the check in
LoggedInFlowNode
or make the return value ofClient::available_sliding_sync_versions()
in Rust to just the native one. If you manage to do one of them:Tested devices
Checklist