Skip to content

[FIX] Share Extension shows a server that has no user logged in - #4336

Merged
dnlsilva merged 2 commits into
developfrom
fix.share-extension-not-logged-in-v2
Jul 20, 2022
Merged

[FIX] Share Extension shows a server that has no user logged in#4336
dnlsilva merged 2 commits into
developfrom
fix.share-extension-not-logged-in-v2

Conversation

@dnlsilva

@dnlsilva dnlsilva commented Jul 4, 2022

Copy link
Copy Markdown
Contributor

Proposed changes

Changes the logic to only set the chosen server if the login is successful.
Since it is not necessary to set the server and I have not even completed the login.

Note: If it is necessary to keep the server even not logging into it, the right thing would be to create a key, something like a temp key, different from the main key that indicates the logged server.

Closes #4291
I left the old PR just for history and in case you want to compare.

Issue(s)

How to test or reproduce

1 - Start the process of logging in to a server by choosing one, but do not log in to any user account.
a - If this step is not done correctly, at step 4, the user will probably see the screen stating there is no server logged in.
2 - Minimize app
3 - Open Share Extension (by sharing something from the device's gallery)
4 - Try choosing a server to share the file to.

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

@diegolmello diegolmello left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the solution is a lot clever than the other one, but it's not free of bugs :)

  • Open the app
  • Login on open
  • Close the app and reopen
  • You're now logged out
  • Only if you tap join community, it's going to trigger handleSelectServer with a user.

Maybe we should add a logic like that to loginSuccess?

@dnlsilva
dnlsilva force-pushed the fix.share-extension-not-logged-in-v2 branch from e35bba5 to b37d9ee Compare July 20, 2022 20:43
@dnlsilva
dnlsilva merged commit 1c1dfe5 into develop Jul 20, 2022
@dnlsilva
dnlsilva deleted the fix.share-extension-not-logged-in-v2 branch July 20, 2022 20:49
diegolmello pushed a commit that referenced this pull request Sep 12, 2022
* [FIX] Share Extension shows a server that has no user logged in

* set server after login
navislavo pushed a commit to NextiaDev/Rocket.Chat.ReactNative that referenced this pull request May 26, 2023
…etChat#4336)

* [FIX] Share Extension shows a server that has no user logged in

* set server after login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants