Skip to content

Fix terms of service clearing all data when accessing it offline#3797

Open
andreia-ferreira wants to merge 4 commits into
masterfrom
andreia/3763/tos-instant-logout
Open

Fix terms of service clearing all data when accessing it offline#3797
andreia-ferreira wants to merge 4 commits into
masterfrom
andreia/3763/tos-instant-logout

Conversation

@andreia-ferreira

Copy link
Copy Markdown
Collaborator

Fixes #3763

When clicking on the Terms of Service in the home drawer when offline, the app would instantly logout the user. This could cause data loss, since the user could have pending submissions and the logout process clears all data.

This PR updates the TermsOfServiceViewModel so that when the user already accepted the terms of service (when isViewOnly=true) the screen will have a simple error state with a retry button, which a user can attempt to retry loading the terms.

Before:

Screen_recording_20260619_115529.webm

After:

Screen_recording_20260619_121230.webm

@shobhitagarwal1612 PTAL?

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.97959% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.55%. Comparing base (bd0fe40) to head (e852d94).

Files with missing lines Patch % Lines
...undplatform/android/ui/tos/TermsOfServiceScreen.kt 39.02% 24 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3797      +/-   ##
============================================
- Coverage     66.59%   66.55%   -0.05%     
- Complexity     1683     1685       +2     
============================================
  Files           392      392              
  Lines         10145    10183      +38     
  Branches       1295     1297       +2     
============================================
+ Hits           6756     6777      +21     
- Misses         2712     2729      +17     
  Partials        677      677              
Files with missing lines Coverage Δ
...platform/android/ui/tos/TermsOfServiceViewModel.kt 86.04% <100.00%> (+1.83%) ⬆️
...undplatform/android/ui/tos/TermsOfServiceScreen.kt 66.66% <39.02%> (-12.29%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Clicking on Terms of Service when offline triggers logout

1 participant