Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for media tab not showing thumbnails when image not in cache manager #13158

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

camillo-positano
Copy link
Contributor

@camillo-positano camillo-positano commented Jun 20, 2024

  • Tests written, or not not needed

Hello i've had this issue for a long time and wanted to fix it.

The problem i found was that the cache manager never requested the server for a thumbnail because the condition to do so was never true. This caused that all my remote photos thumbnails were the default thumbnail image.

From what i understand if there is not a preview but there is a remote id it should ask the server for a thumbnail.

This never happened because of an && instead of an ||.

I also had to set updateThumbnailNeeded to false when it finished otherwise it entered a loop because it kept passing the validation: if (thumbnail == null || file.isUpdateThumbnailNeeded()).

Regarding test i didn't really understand where and how to test this functionality because, in case of an integration test, i need a server to call.

I would be more than happy to add a test if some kind soul could give me a little help xD <3

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

Thanks for your contribution 💯

After this change, I came across something like this. Besides that current implementation on master for ThumbnailsCacheManager also not ideal and good, we will check it, thank you so much 👍

Screen.Recording.2024-06-20.at.15.22.59.mp4

@camillo-positano
Copy link
Contributor Author

Hey should be fixed now! could you give it a check?

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.

Tested, working

@camillo-positano
Copy link
Contributor Author

This merge should also close this isse: #10389

@AndyXheli
Copy link

AndyXheli commented Jun 27, 2024

@camillo-positano do you have an apk so I can install and check it out?

… and not in the cache manager.

Signed-off-by: camillo-positano <camillo.positano@hotmail.it>
Signed-off-by: camillo-positano <camillo.positano@hotmail.it>
…CFile. Added log when there is no preview and no remote id.

Signed-off-by: camillo-positano <camillo.positano@hotmail.it>
Signed-off-by: camillo-positano <camillo.positano@hotmail.it>
@AndyScherzinger AndyScherzinger merged commit a37e6d2 into nextcloud:master Jun 27, 2024
20 checks passed
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.30.0 milestone Jun 27, 2024
@camillo-positano
Copy link
Contributor Author

@AndyXheli if you want to give it a try here is the apk: https://we.tl/t-MCTLpO7EyX

@AndyScherzinger
Copy link
Member

It will also be part of the next daily build :)

Copy link

github-actions bot commented Jul 5, 2024

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.)

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.

None yet

4 participants