Optimized battery consumption, fixed blurry photos on some devices, added option to auto download media only via WiFi, changed way of contacts changes monitoring

https://github.com/DrKLO/Telegram/pull/422
d96ce3c140
c9afad8a16b8bb
This commit is contained in:
DrKLO 2014-05-25 02:47:05 +04:00
parent f68ace0fd6
commit 644fc7ccea
27 changed files with 457 additions and 301 deletions

View file

@ -340,16 +340,7 @@ public class MessageObject {
} else if (messageOwner.media instanceof TLRPC.TL_messageMediaPhoto) {
ArrayList<TLRPC.PhotoSize> sizes = messageOwner.media.photo.sizes;
if (sizes.size() > 0) {
int width = (int)(Math.min(Utilities.displaySize.x, Utilities.displaySize.y) * 0.7f);
int height = width + Utilities.dp(100);
if (width > 800) {
width = 800;
}
if (height > 800) {
height = 800;
}
TLRPC.PhotoSize sizeFull = PhotoObject.getClosestPhotoSizeWithSize(sizes, width, height);
TLRPC.PhotoSize sizeFull = PhotoObject.getClosestPhotoSizeWithSize(sizes, 800, 800);
if (sizeFull != null) {
return getAttachFileName(sizeFull);
}