Fix sticker size preview

This commit is contained in:
NekoInverter 2020-06-05 09:40:53 +08:00
parent 13be430274
commit 025b0d3db7
No known key found for this signature in database
GPG Key ID: 280D6CCCF95715F9
2 changed files with 4 additions and 3 deletions

View File

@ -4436,6 +4436,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
} else {
photoImage.setImage(null, null, null, null, messageObject, 0);
}
if (messageObject.useCustomPhoto) {
photoImage.setImageBitmap(getResources().getDrawable(R.drawable.sticker));
}
} else {
currentPhotoObject = FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, AndroidUtilities.getPhotoSize());
photoParentObject = messageObject.photoThumbsObject;

View File

@ -76,6 +76,7 @@ public class StickerSizePreviewMessagesCell extends LinearLayout {
message.to_id = new TLRPC.TL_peerUser();
message.to_id.user_id = 0;
messageObjects[0] = new MessageObject(UserConfig.selectedAccount, message, true);
messageObjects[0].useCustomPhoto = true;
message = new TLRPC.TL_message();
message.message = LocaleController.getString("StickerSizeDialogMessageReplyTo", R.string.StickerSizeDialogMessageReplyTo);
@ -113,9 +114,6 @@ public class StickerSizePreviewMessagesCell extends LinearLayout {
cells[a].isChat = false;
cells[a].setFullyDraw(true);
cells[a].setMessageObject(messageObjects[a], null, false, false);
if (a == 0) {
cells[a].getPhotoImage().setImageBitmap(getResources().getDrawable(R.drawable.sticker));
}
addView(cells[a], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
}