Skip to content

Conversation

@PhilLab
Copy link
Contributor

@PhilLab PhilLab commented Jan 15, 2026

Original PR: #16184

  • Tests written, or not not needed

This tests the deletion behavior when deleting from slide show, fixed in #15636. It also fixes another bug which was uncovered during the automated tests, where the view pager was not correctly updated.

This PR requires #16296 to be merged first, as the automated tests also stumble upon the same timing issue fixed (and tested!) in said PR.

@PhilLab
Copy link
Contributor Author

PhilLab commented Jan 21, 2026

@tobiasKaminsky @alperozturk96 Now I am concerned. I checked this PR's drone run and saw that the PreviewImageActivityIT.kt was checked out, but apparently did not actually run.

I then created a PR to provoke a failure, #16329 (comment), and its drone test ran through: https://drone.nextcloud.com/nextcloud/android/27697

Where is the error?

Update Seems this is a more general problem, as many more provoked failures are not catched in the CI. I created #16350 to track this. So it is more or less independent of the PR here, as it is a more widespread issue.

@github-actions
Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@alperozturk96 alperozturk96 force-pushed the ph/test_15636_deleting_from_slideshow branch from d156ccb to 6d7d20a Compare January 30, 2026 07:29
Testing the case of localOnly files.
As the deletion logic differs per scenario, tests for the online
scenario will also need to be added.

Signed-off-by: Philipp Hasper <vcs@hasper.info>
Otherwise, the localOnly file deletion will not update the UI.

Signed-off-by: Philipp Hasper <vcs@hasper.info>
The remote + offline test case had to be ignored due to two reasons
1) Broken App behavior
- The UX is indeed broken, as from a user perspective, nothing happens
  with the file when deleting it. The offlineOperation is put on the worker
  stack, but the user doesn't see anything from it
- Even when coming back online, it is completely unreliable when the
  deletion will be finally done. It might happen 5 or 10 minutes later
2) Broken test mock
- The mocked connectivityService doesn't work as expected, because the
  OfflineOperationsWorker has its own service, and thus might still
  execute the deletion, but just at an unforseable time during the test
  execution - see problem 1).

Signed-off-by: Philipp Hasper <vcs@hasper.info>
…e list

The existing test cases varied by configuration: local vs. remote,
online vs. offline. This is now extended by also starting at different
entry points: beginning, end and middle of the list.

Signed-off-by: Philipp Hasper <vcs@hasper.info>
@alperozturk96 alperozturk96 force-pushed the ph/test_15636_deleting_from_slideshow branch from 6d7d20a to 28eda97 Compare January 30, 2026 12:21
@github-actions
Copy link

Codacy

SpotBugs

CategoryBaseNew
Bad practice4343
Correctness7474
Dodgy code258258
Experimental11
Internationalization77
Malicious code vulnerability33
Multithreaded correctness3434
Performance4343
Security1818
Total481481

@github-actions
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16297.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions
Copy link

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

Copy link
Collaborator

@alperozturk96 alperozturk96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello

Thank you for the PR and for the updates.

I tested it with the latest master branch. I noticed that when a user deletes a picture from the preview, the next image appears not file listing as expected so I couldn't able to reproduce the bug.

Also, the onRemoveFileOperationFinish function updates the adapter and should trigger the UI updates, rather than handling it directly in RemoveFilesDialogFragment.kt‎.

As a side note, not directly related to this PR: the line fda?.refreshCurrentDirectory() may be unnecessary, since onRemoveFileOperationFinish already performs the update.

I suggest to remove unnecessary lines (refreshDirectory, initPager) from RemoveFilesDialogFragment.kt‎ , test again and add tests for these scenarios.

Thanks again for your work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants