Glide -> glideRequests in GiphyAdapter

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-11-02 18:12:06 -07:00
parent 90203e4872
commit 3ed82c1726

View File

@ -101,8 +101,7 @@ class GiphyAdapter extends RecyclerView.Adapter<GiphyAdapter.GiphyViewHolder> {
} }
} }
return Glide.with(context) return glideRequests.load(forMms ? new GiphyPaddedUrl(image.getGifMmsUrl(), image.getMmsGifSize()) :
.load(forMms ? new GiphyPaddedUrl(image.getGifMmsUrl(), image.getMmsGifSize()) :
new GiphyPaddedUrl(image.getGifUrl(), image.getGifSize())) new GiphyPaddedUrl(image.getGifUrl(), image.getGifSize()))
.downloadOnly(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL) .downloadOnly(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
.get(); .get();
@ -172,7 +171,7 @@ class GiphyAdapter extends RecyclerView.Adapter<GiphyAdapter.GiphyViewHolder> {
@Override @Override
public void onViewRecycled(GiphyViewHolder holder) { public void onViewRecycled(GiphyViewHolder holder) {
super.onViewRecycled(holder); super.onViewRecycled(holder);
Glide.with(context).clear(holder.thumbnail); glideRequests.clear(holder.thumbnail);
} }
@Override @Override