element-hq / element-hq/element-android

Show confirmation dialog when clearing app cache

Open
#6,055 2 comments 0 reactions 0 assignees View on GitHub
A-Settings T-Enhancement X-Needs-Product
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.