element-hq / element-hq/element-android
Show confirmation dialog when clearing app cache
- Dominant language
- Kotlin
- Stars
- 3.7k
- Forks
- 917
- PR merge metrics
- No merged PRs in 30d
Description
### Your use case
#### What would you like to do?
When I tap on `Clear cache` in Settings > General, the app should show a confirmation dialogue, preferably with some explanation text.
#### Why would you like to do it?
The `Clear cache` button suddenly leads to an irreversible, unstoppable process of initial sync, which is a potentially expensive operation depending on the account. Any taps on this button should be prevented from taking effect until the user confirms the action, since it could easily be done accidentally, or out of ignorance about its function.
I don't know how error-resilient the initial sync process is. I can imagine someone panicking upon tapping the button and seeing its effect, and doing something rash like swiping it away from Recents, or even force-stopping the app. If that disrupts the initial sync, that might also be bad.
### Have you considered any alternatives?
Put these 2 clearing buttons inside Advanced settings, maybe? They would still need some description text, though.
### Additional context
Maybe there should be a confirmation dialogue for the `Clear media cache` button as well. It's not as big a deal, but it would still lead to some re-downloading, which the user might want to avoid.
Contributor guide
Assessment
This issue has not been assessed yet.