mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Merge pull request #516 from nextcloud/thumbnailRound
round thumbnail size to power of 2: 384 => 256
This commit is contained in:
commit
f067df2bd5
1 changed files with 2 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue