Skip to content

Commit

Permalink
Merge pull request #3035 from owncloud/feature/improve_thumbnails
Browse files Browse the repository at this point in the history
Improve thumbnails
  • Loading branch information
abelgardep authored Jan 15, 2021
2 parents 906690e + 07acc24 commit 3432112
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion owncloud-android-library
Original file line number Diff line number Diff line change
Expand Up @@ -274,24 +274,6 @@ private Bitmap doOCFileInBackground() {

int px = getThumbnailDimension();

if (file.isDown()) {
Bitmap temp = BitmapUtils.decodeSampledBitmapFromFile(
file.getStoragePath(), px, px);
Bitmap bitmap = ThumbnailUtils.extractThumbnail(temp, px, px);

if (bitmap != null) {
// Handle PNG
if (file.getMimetype().equalsIgnoreCase("image/png")) {
bitmap = handlePNG(bitmap, px);
}

thumbnail = addThumbnailToCache(imageKey, bitmap, file.getStoragePath(), px);

file.setNeedsUpdateThumbnail(false);
mStorageManager.saveFile(file);
}

} else {
// Download thumbnail from server
if (mClient != null) {
GetMethod get;
Expand Down Expand Up @@ -322,7 +304,6 @@ private Bitmap doOCFileInBackground() {
}
}
}
}

return thumbnail;

Expand Down

0 comments on commit 3432112

Please sign in to comment.