owncloud / android

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

[BUG] Removing local copy of non-previewable file leads to empty view #4428

Open jesmrec opened 4 months ago

jesmrec commented 4 months ago

Steps to reproduce

  1. Click on a non-previewable** file (like an office file) -> downloaded in Details view
  2. In Details view, click on three-dot-button and Remove
  3. Select Local only

Actual behaviour

empty view like:

https://github.com/owncloud/android/assets/14894746/75b88328-0be4-4228-ac0d-353be6ffc7bc

Expected behaviour

behaviour when a previewable file is deleted, move back to the list of files:

https://github.com/owncloud/android/assets/14894746/2f74023a-b5a4-4174-866e-cc2437f7cc4c

** after some testing, i guess that the difference comes from the previewability of the file, but i can not assure it at all

rohit9625 commented 2 months ago

May I work on this issue?

jesmrec commented 1 month ago

go ahead @rohit9625

rohit9625 commented 1 month ago

Thank you :)

jesmrec commented 1 month ago

Let us know if you need any help. Please, take a look to our CONTRIBUTING file to get some guidelines about the way to send the PR.

Pay special attention to the branch names, commit names (following conventional commits) and finally, to the calens file that will add your contribution to the product changelog.

Thanks a lot!

rohit9625 commented 1 month ago

The app asked me to enter a URL. Are there any developer-specific URLs or do I need to create my own server?

jesmrec commented 1 month ago

@rohit9625 use the ones mentioned here:

https://github.com/owncloud/android/pull/4435#issuecomment-2247681473

rohit9625 commented 1 month ago

Thank you @jesmrec I tried with demo server and reproduced the bug successfully. Looking for a fix

rohit9625 commented 1 month ago

Hey @jesmrec I found the current behavior very unreliable. Sometimes deleting an image doesn't close the details fragment but sometimes it does close it and navigate to the list of files fragment. Same for non-previewable doc files. Did you ever experience the same behavior? However, after debugging through breakpoints, I did not find any code that could be causing this bug. Please let me know if you have any specific files to check.

jesmrec commented 1 month ago

I found the current behavior very unreliable. Sometimes deleting an image doesn't close the details fragment but sometimes it does close it and navigate to the list of files fragment. Same for non-previewable doc files. Did you ever experience the same behavior?

yes, behaviour is not exact. I clarified it in the bottom of the top message, like:

** after some testing, i guess that the difference comes from the previewability of the file, but i can not assure it at all

Specific files, i did not test with specific files, just separating previewable / non-previewable, and guessing that the behaviour goes in that direction.