Skip to content
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

Auth : fix restore session when there is no network. #3109

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Jun 27, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

When app is launched in airplane mode, the user is presented with login screen.
Using ClientBuilder.serverNameOrhomeserverUrl is launching some network requests, which failed.

Also made some changes so we don't configure slidingSyncProxy when restoring a session.

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@ganfra ganfra marked this pull request as ready for review June 27, 2024 16:08
@ganfra ganfra requested a review from a team as a code owner June 27, 2024 16:08
@ganfra ganfra requested review from jmartinesp and removed request for a team June 27, 2024 16:08
@ganfra ganfra added the PR-Bugfix For bug fix label Jun 27, 2024
@@ -48,7 +47,7 @@ class RustMatrixClientFactory @Inject constructor(
) {
suspend fun create(sessionData: SessionData): RustMatrixClient = withContext(coroutineDispatchers.io) {
val client = getBaseClientBuilder(sessionData.sessionPath, sessionData.passphrase)
.serverNameOrHomeserverUrl(sessionData.homeserverUrl)
.homeserverUrl(sessionData.homeserverUrl)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the fix

Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/TwKsmE

Copy link

sonarcloud bot commented Jun 27, 2024

@ganfra ganfra enabled auto-merge June 27, 2024 16:16
@ganfra ganfra added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 27, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 27, 2024
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.96%. Comparing base (d6b259b) to head (e9c995f).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3109   +/-   ##
========================================
  Coverage    75.96%   75.96%           
========================================
  Files         1636     1636           
  Lines        38617    38617           
  Branches      7463     7463           
========================================
  Hits         29335    29335           
  Misses        5393     5393           
  Partials      3889     3889           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ganfra ganfra merged commit 0c543ab into develop Jun 27, 2024
31 checks passed
@ganfra ganfra deleted the feature/fga/fix_restore_session_no_network branch June 27, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants