mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-05-05 23:51:00 +00:00
Update to 2.4.0
This commit is contained in:
parent
2fcef37b9e
commit
dff666fca1
227 changed files with 10202 additions and 3920 deletions
|
|
@ -13,6 +13,7 @@ import android.app.KeyguardManager;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
import android.text.TextUtils;
|
||||
|
|
@ -45,7 +46,6 @@ import org.telegram.android.NotificationCenter;
|
|||
import org.telegram.messenger.R;
|
||||
import org.telegram.messenger.TLRPC;
|
||||
import org.telegram.android.MessageObject;
|
||||
import org.telegram.android.PhotoObject;
|
||||
import org.telegram.ui.ActionBar.ActionBar;
|
||||
import org.telegram.ui.ActionBar.ActionBarMenu;
|
||||
import org.telegram.ui.Components.AvatarDrawable;
|
||||
|
|
@ -524,7 +524,8 @@ public class PopupNotificationActivity extends Activity implements NotificationC
|
|||
imageView.imageReceiver.setAspectFit(true);
|
||||
|
||||
if (messageObject.type == 1) {
|
||||
PhotoObject currentPhotoObject = PhotoObject.getClosestImageWithSize(messageObject.photoThumbs, AndroidUtilities.getPhotoSize());
|
||||
TLRPC.PhotoSize currentPhotoObject = FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, AndroidUtilities.getPhotoSize());
|
||||
TLRPC.PhotoSize thumb = FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, 100);
|
||||
boolean photoSet = false;
|
||||
if (currentPhotoObject != null) {
|
||||
boolean photoExist = true;
|
||||
|
|
@ -535,11 +536,11 @@ public class PopupNotificationActivity extends Activity implements NotificationC
|
|||
}
|
||||
}
|
||||
if (photoExist || MediaController.getInstance().canDownloadMedia(MediaController.AUTODOWNLOAD_MASK_PHOTO)) {
|
||||
imageView.setImage(currentPhotoObject.photoOwner.location, "100_100", messageObject.imagePreview, currentPhotoObject.photoOwner.size);
|
||||
imageView.setImage(currentPhotoObject.location, "100_100", thumb.location, currentPhotoObject.size);
|
||||
photoSet = true;
|
||||
} else {
|
||||
if (messageObject.imagePreview != null) {
|
||||
imageView.setImageBitmap(messageObject.imagePreview);
|
||||
if (thumb != null) {
|
||||
imageView.setImage(thumb.location, null, (Drawable) null);
|
||||
photoSet = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue