mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-05-07 17:31:18 +00:00
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:
parent
f68ace0fd6
commit
644fc7ccea
27 changed files with 457 additions and 301 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue