mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Show sticker emoji in notification.
This commit is contained in:
committed by
Cody Henthorne
parent
12dfcaf7e7
commit
2fd46b196b
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user