element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.37k stars 718 forks source link

Show confirmation dialog when clearing app cache #6055

Open opusforlife2 opened 2 years ago

opusforlife2 commented 2 years ago

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.

ouchadam commented 2 years ago

cc'ing product so we can align all the platforms

opusforlife2 commented 4 months ago

This is still a major issue. The button can get tapped on accident while scrolling, and the user may not be in a situation where a surprise network-intensive process can start and finish reliably, such as spotty internet, lack of signal, etc.