Merge pull request #516 from nextcloud/thumbnailRound

round thumbnail size to power of 2: 384 => 256
This commit is contained in:
Andy Scherzinger 2017-01-29 21:35:22 +01:00 committed by GitHub
commit f067df2bd5

View file

@ -286,7 +286,8 @@ public class ThumbnailsCacheManager {
private int getThumbnailDimension(){
// Converts dp to pixel
Resources r = MainApp.getAppContext().getResources();
return Math.round(r.getDimension(R.dimen.file_icon_size_grid));
Double d = Math.pow(2,Math.floor(Math.log(r.getDimension(R.dimen.file_icon_size_grid))/Math.log(2)));
return d.intValue();
}
private Bitmap doOCFileInBackground() {