From 16f277761e071ba4a2178a234a1e6efc8f5571b0 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Thu, 27 Oct 2016 18:06:16 -0700 Subject: [PATCH] Use smaller gifs to improve load time // FREEBIE --- .../thoughtcrime/securesms/giph/model/GiphyImage.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/giph/model/GiphyImage.java b/src/org/thoughtcrime/securesms/giph/model/GiphyImage.java index b804e97504..f70eb88dd4 100644 --- a/src/org/thoughtcrime/securesms/giph/model/GiphyImage.java +++ b/src/org/thoughtcrime/securesms/giph/model/GiphyImage.java @@ -9,15 +9,15 @@ public class GiphyImage { private ImageTypes images; public String getGifUrl() { - return images.downsized_medium.url; + return images.downsized.url; } public float getGifAspectRatio() { - return (float)images.downsized_medium.width / (float)images.downsized_medium.height; + return (float)images.downsized.width / (float)images.downsized.height; } public String getStillUrl() { - return images.fixed_width_still.url; + return images.downsized_still.url; } public static class ImageTypes { @@ -37,6 +37,10 @@ public class GiphyImage { private ImageData fixed_width_small; @JsonProperty private ImageData downsized_medium; + @JsonProperty + private ImageData downsized; + @JsonProperty + private ImageData downsized_still; } public static class ImageData {