owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.77k stars 3.08k forks source link

[BUG] Av. offline files removed locally with the `Local only` option #4353

Closed jesmrec closed 3 weeks ago

jesmrec commented 3 months ago

Steps to reproduce

  1. Set as av. offline any file that is inside other folder (recursive)
  2. Long press over the container folder
  3. Select Remove
  4. Select Local Only

Actual behaviour

The local copy(s) of the av. offline file(s) are removed from internal storage. Recovered when browsing or when the av. offline worker runs

Expected behaviour

Local copies of av. offline files should be never removed. Available offline means "downloaded + synced", so, we can not get rid of local copies because a lack of connection before a sync could lead users to a non-reachable status, breaking the av. offline condition.

After developing a solution for https://github.com/owncloud/android/issues/3936, the option Local Only is only displayed in case of folders, if any file inside is downloaded. An extra condition should be added, so that, this is the new expected result:

Local only displayed: