Show sticker emoji in notification.

This commit is contained in:
Greyson Parrelli
2020-09-03 10:02:33 -04:00
committed by Cody Henthorne
parent 12dfcaf7e7
commit 2fd46b196b
11 changed files with 77 additions and 20 deletions

View File

@@ -13,17 +13,23 @@ import org.thoughtcrime.securesms.blurhash.BlurHash;
import org.thoughtcrime.securesms.stickers.StickerLocator;
import org.thoughtcrime.securesms.util.MediaUtil;
import java.util.Objects;
public class StickerSlide extends Slide {
public static final int WIDTH = 512;
public static final int HEIGHT = 512;
private final StickerLocator stickerLocator;
public StickerSlide(@NonNull Context context, @NonNull Attachment attachment) {
super(context, attachment);
this.stickerLocator = Objects.requireNonNull(attachment.getSticker());
}
public StickerSlide(Context context, Uri uri, long size, @NonNull StickerLocator stickerLocator, @NonNull String contentType) {
super(context, constructAttachmentFromUri(context, uri, contentType, size, WIDTH, HEIGHT, true, null, null, stickerLocator, null, null, false, false, false));
this.stickerLocator = Objects.requireNonNull(attachment.getSticker());
}
@Override
@@ -50,4 +56,8 @@ public class StickerSlide extends Slide {
public @NonNull String getContentDescription() {
return context.getString(R.string.Slide_sticker);
}
public @Nullable String getEmoji() {
return stickerLocator.getEmoji();
}
}