-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Summary
The CommonsApplication.kt file contains two long-standing TODO items. The first involves a non-standard try-catch block for Fresco initialization that should be handled by environment checks. The second is a logic flaw in clearApplicationData where the app performs a "nuclear" clear of all preferences, causing users to lose their Theme and Language settings every time they log out.
Steps to reproduce
- Log in to the Commons app.
- Go to Settings and change the App Theme to "Dark/Light" (Don't keep to system default).
- Change the App UI Language to something other than the system default.
- Navigate to the "More" tab and tap "Logout".
- Observe the UI state on the Login screen and after the data clear process completes.
Expected behaviour
- Fresco: Initialization should be handled safely based on the build environment without relying on a generic try-catch.
- Settings: User-agnostic UI preferences like appThemePref and appUiLanguage should be preserved during logout so the user's visual and accessibility choices remain intact.
Actual behaviour
- Fresco: Uses a generic try-catch with a TODO comment as a "band-aid" for test builds.
- Settings: The app calls defaultPrefs.clearAll(), which wipes every setting, including the theme and language. The app then manually sets firstrun to false, but all other UI customizations are lost.
Device name
Redmi Note 13 Pro
Android version
Android 13
Commons app version
ProDebug
Device logs
No response
Screenshots
No response
Would you like to work on the issue?
Yes
Metadata
Metadata
Assignees
Labels
No labels