session-android/src/org/thoughtcrime/securesms/mms/GifSlide.java
Greyson Parrelli ea374735e1 Render images in a conversation true-to-size.
Previously, we were always rendering images as squares. Instead of doing
that, we now render them as close to true-to-size as possible (within
reasonable min/max width/height boundaries).
2018-03-31 02:14:02 -07:00

26 lines
684 B
Java

package org.thoughtcrime.securesms.mms;
import android.content.Context;
import android.net.Uri;
import android.support.annotation.Nullable;
import org.thoughtcrime.securesms.attachments.Attachment;
import org.thoughtcrime.securesms.util.MediaUtil;
public class GifSlide extends ImageSlide {
public GifSlide(Context context, Attachment attachment) {
super(context, attachment);
}
public GifSlide(Context context, Uri uri, long size, int width, int height) {
super(context, constructAttachmentFromUri(context, uri, MediaUtil.IMAGE_GIF, size, width, height, true, null, false));
}
@Override
@Nullable
public Uri getThumbnailUri() {
return getUri();
}
}