Skip to content

Fix media view not being refreshed when selecting a different media folder - #17539

Merged
alperozturk96 merged 2 commits into
masterfrom
fix/media-not-refreshed-after-folder-change
Sep 2, 2026
Merged

Fix media view not being refreshed when selecting a different media folder#17539
alperozturk96 merged 2 commits into
masterfrom
fix/media-not-refreshed-after-folder-change

Conversation

@daniele-verducci

@daniele-verducci daniele-verducci commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

How to reproduce:

  • Open app
  • Go to media view
  • 3 dots menu -> select "Set media folder"
  • Choose another media folder
  • The view is not refreshed*
  • = this may not happen the first time, as the check is successful if there have been changes in the media folder. If you can't reproduce, retry.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

…older

Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
@daniele-verducci

Copy link
Copy Markdown
Contributor Author

@alperozturk96 I'm not sure this is the correct solution, can you take a look? I saw you worked on the same files previously.
The problem is that currently the check to decide if refresh the view is done on the return value of parseMedia(), but that one, as far as I can understand, refreshes the local files based on the remote ones and returnes true only if there have been changes. The result is placed in an emptySearch variable, so maybe it's just a misunderstanding. I think emptySearch must be true only if there are no files at all. Is it correct?
(note that the media view doesn't have a search feature, so the search is always called with an empty query)

@github-actions

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/33408744223/artifacts/9769825543
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Signed-off-by: daniele-verducci <daniele.verducci@nextcloud.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codacy

SpotBugs

CategoryBaseNew
Bad practice3232
Correctness5959
Dodgy code207207
Experimental11
Malicious code vulnerability22
Multithreaded correctness2525
Performance3939
Security1919
Total384384

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/33495008205/artifacts/9798291507
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@alperozturk96
alperozturk96 merged commit e4de160 into master Sep 2, 2026
22 of 24 checks passed
@alperozturk96
alperozturk96 deleted the fix/media-not-refreshed-after-folder-change branch September 2, 2026 10:34
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.

2 participants