diff --git a/src/org/thoughtcrime/securesms/giph/ui/GiphyAdapter.java b/src/org/thoughtcrime/securesms/giph/ui/GiphyAdapter.java index 8761ae087b..ab89e38ab9 100644 --- a/src/org/thoughtcrime/securesms/giph/ui/GiphyAdapter.java +++ b/src/org/thoughtcrime/securesms/giph/ui/GiphyAdapter.java @@ -101,11 +101,10 @@ class GiphyAdapter extends RecyclerView.Adapter { } } - return Glide.with(context) - .load(forMms ? new GiphyPaddedUrl(image.getGifMmsUrl(), image.getMmsGifSize()) : - new GiphyPaddedUrl(image.getGifUrl(), image.getGifSize())) - .downloadOnly(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL) - .get(); + return glideRequests.load(forMms ? new GiphyPaddedUrl(image.getGifMmsUrl(), image.getMmsGifSize()) : + new GiphyPaddedUrl(image.getGifUrl(), image.getGifSize())) + .downloadOnly(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL) + .get(); } public synchronized void setModelReady() { @@ -172,7 +171,7 @@ class GiphyAdapter extends RecyclerView.Adapter { @Override public void onViewRecycled(GiphyViewHolder holder) { super.onViewRecycled(holder); - Glide.with(context).clear(holder.thumbnail); + glideRequests.clear(holder.thumbnail); } @Override