wordpress-mobile / wordpress-mobile/WordPress-Android
Clear account-specific info from local Room tables when signing out
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 3.2k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 69
Description
We already clear several user-specific information from local Databases (all managed with WellSql as far as I could find) but I noticed that some info is not cleared from some of the tables we manage using Room.
Some of the tables that persist user-specific data even after logout are the BloggingRemidnders and DashboardCards tables, as they locally save data for specific sites and those are never deleted upon logout.
The method that dispatches record-deleting events upon logout for WP.com accounts is the following:
https://github.com/wordpress-mobile/WordPress-Android/blob/2857f3f16ea362e91e95b0928bd1ffb3908036e8/WordPress/src/main/java/org/wordpress/android/AppInitializer.kt#L625
The Android Studio App Inspector can be used to confirm the issue. This will likely need changes in FluxC as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at AppInitializer.kt around line 625, where record-deleting events are dispatched on WP.com logout. Use Android Studio App Inspector to inspect the Room-managed BloggingRemidnders and DashboardCards tables, and trace the related FluxC handling. Done means user-specific records in those tables are removed when the account signs out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- database, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100