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

Remove session preferences on logout. #2303

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Jan 26, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

  • Listens to session status in DefaultSessionPreferencesStoreFactory and both remove the preferences from its cache and from disk when a user is logged out.

Motivation and context

We should remove session preferences when the user logs out.

Tests

  • Log in using an account.
  • Go to settings -> advanced settings -> disable 'read receipts'.
  • Log out.
  • Log in again.
  • Go to settings -> advanced settings -> 'read receipts' should be enabled again.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

Copy link
Contributor

github-actions bot commented Jan 26, 2024

📱 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/ceRM4y

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (e39711b) 70.05% compared to head (379da14) 70.04%.

Files Patch % Lines
...mpl/store/DefaultSessionPreferencesStoreFactory.kt 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2303      +/-   ##
===========================================
- Coverage    70.05%   70.04%   -0.02%     
===========================================
  Files         1353     1353              
  Lines        33233    33239       +6     
  Branches      6872     6873       +1     
===========================================
  Hits         23283    23283              
- Misses        6641     6647       +6     
  Partials      3309     3309              

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

Observe the sessions in `DefaultSessionPreferencesFactory` and remove the session preferences from both the cache and disk when a session is finished.
@jmartinesp jmartinesp force-pushed the misc/jme/remove-session-preferences-on-logout branch from 5edb4bc to 8e9e9d8 Compare January 31, 2024 09:35
Copy link

sonarcloud bot commented Jan 31, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@jmartinesp jmartinesp marked this pull request as ready for review January 31, 2024 09:43
@jmartinesp jmartinesp requested a review from a team as a code owner January 31, 2024 09:43
@jmartinesp jmartinesp requested review from bmarty and removed request for a team January 31, 2024 09:43
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@jmartinesp jmartinesp merged commit eff515e into develop Feb 2, 2024
13 of 15 checks passed
@jmartinesp jmartinesp deleted the misc/jme/remove-session-preferences-on-logout branch February 2, 2024 15:26
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