feat: enhance thumbnail generation - #4946
Conversation
|
hi @alexknop!! thanks for your contribution. We'll check it as soon as posible. Some inputs about, in order to put the code in shape:
|
2a628ad to
c50529c
Compare
|
@jesmrec This is done. I was a bit confused on the two AccountUtils files but believe I referenced the correct one in the ThumbnailRequester file. |
|
Cool @alexknop!! as in #4943, i'd suggest to compact the calens file. Again, my suggestion: Calens file is intended to be a quick entry, not a complete description of the work. For that aim, the issue/PR is the best option. Changelog should be read at a glance. Thanks again for your engagement! |
60d5592 to
842234a
Compare
|
@jesmrec done, thank you for your feedback. I'll get the hang of these things eventually... |
842234a to
7e195c2
Compare
|
The same note as on the other PR: all commits must be GPG/PGP signed and include a |
|
Related issue: #4443 |
7e195c2 to
a484d2a
Compare
|
@joragua done! |
Signed-off-by: alex <knopalex@msu.edu>
Signed-off-by: alex <knopalex@msu.edu>
a484d2a to
690cf68
Compare
|
@joragua fixed signed commits. |
joragua
left a comment
There was a problem hiding this comment.
Hi @alexknop! Thanks for this contribution! Some comments about the first CR round. Let us know if you have any doubts and we will be happy to help you! 💯
NOTE: Please don't forget that there should be only one commit for calens file in the PR. In case yo need to make any changes, you will need to rebase the commits and create a new one.
| @@ -0,0 +1,5 @@ | |||
| Enhancement: Thumbnail caching | |||
|
|
|||
| Thumbnail caching system has been improved for a better experience and performance. | |||
There was a problem hiding this comment.
I'd write the calens body like this:
| Thumbnail caching system has been improved for a better experience and performance. | |
| Thumbnail caching system has been improved for a better experience and performance. Thumbnails are now loaded from the cache whenever possible instead of being regenerated each time, reducing loading times. |
|
|
||
| Thumbnail caching system has been improved for a better experience and performance. | ||
|
|
||
| https://github.com/owncloud/android/pull/4946 |
There was a problem hiding this comment.
The issue id is missing here:
| https://github.com/owncloud/android/pull/4946 | |
| https://github.com/owncloud/android/issues/4443 | |
| https://github.com/owncloud/android/pull/4946 |
| private static boolean mThumbnailCacheStarting = true; | ||
|
|
||
| private static final int DISK_CACHE_SIZE = 1024 * 1024 * 10; // 10MB | ||
| private static final int DISK_CACHE_SIZE = 1024 * 1024 * 250; // 250MB |
There was a problem hiding this comment.
Why did you choose 250 MB? Is there any specific reason for this value? 🤔
| } | ||
| task.execute(file) | ||
| fileIcon.load( | ||
| ThumbnailsRequester.getPreviewUriForFile(fileWithSyncInfo, account!!), |
There was a problem hiding this comment.
Be careful with account!! clause. What could happen if the value of this variable is null?
| marginVertical = 0, | ||
| height = context.resources.getDimensionPixelSize(R.dimen.item_file_grid_height), | ||
| width = context.resources.getDimensionPixelSize(R.dimen.item_file_grid_width), | ||
| ) |
There was a problem hiding this comment.
I'm not sure if this logic is valid at this point, since before these changes there were two different configurations (margin, height, and width) depending on the thumbnail. Now, there's only one configuration, and with Coil, thumbnails are generated asynchronously.
Could it be a risk for grid mode? 🤔 Maybe, it will need an extra check...
Related Issues
Solution:
App:
ReleaseNotesViewModel.ktcreating a newReleaseNote()with String resources (if required)QA