Skip to content

Commit

Permalink
fix for media tab not showing thumbnails when image is on server only…
Browse files Browse the repository at this point in the history
… and not in the cache manager.

Signed-off-by: camillo-positano <camillo.positano@hotmail.it>
  • Loading branch information
camillo-positano committed Jun 20, 2024
1 parent 95c84b4 commit 83f932a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ protected Bitmap doInBackground(Object... params) {
file = (OCFile) params[0];


if (file.getRemoteId() != null && file.isPreviewAvailable()) {
if (file.getRemoteId() != null || file.isPreviewAvailable()) {
// Thumbnail in cache?
thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
ThumbnailsCacheManager.PREFIX_RESIZED_IMAGE + file.getRemoteId()
Expand Down Expand Up @@ -1423,7 +1423,7 @@ private static Bitmap doResizedImageInBackground(OCFile file, FileDataStorageMan
}
}

// resized dimensions
// resized dimensions and set update thumbnail needed to false to prevent rendering loop
if (thumbnail != null) {
file.setImageDimension(new ImageDimension(thumbnail.getWidth(), thumbnail.getHeight()));
storageManager.saveFile(file);
Expand Down

0 comments on commit 83f932a

Please sign in to comment.