mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-31 11:25:03 +01:00
bug fix
This commit is contained in:
parent
c58eaf2094
commit
ff86c82557
@ -50,7 +50,11 @@ public class EmojiLoader extends AsyncExecutor<EmojiLoader.EmojiParam, EmojiLoad
|
||||
icon = BitmapFactory.decodeStream(input);
|
||||
cache.putImage(emoji.getCode(), icon);
|
||||
}
|
||||
icon = Bitmap.createScaledBitmap(icon, param.size, param.size, false);
|
||||
if (icon.getHeight() > 0 && icon.getWidth() > 0) {
|
||||
icon = Bitmap.createScaledBitmap(icon, icon.getWidth() * param.size / icon.getHeight(), param.size, false);
|
||||
} else {
|
||||
icon = Bitmap.createScaledBitmap(icon, param.size, param.size, false);
|
||||
}
|
||||
result.put(emoji.getCode(), icon);
|
||||
}
|
||||
cache.trimCache();
|
||||
|
Loading…
x
Reference in New Issue
Block a user