Skip to content

Commit

Permalink
Fix android caching / preloading.
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVann committed Jan 31, 2018
1 parent 906c81a commit de4f40a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import com.bumptech.glide.Glide;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
import com.bumptech.glide.request.RequestListener;
Expand Down Expand Up @@ -142,6 +143,7 @@ public void setSrc(ImageViewWithUrl view, @Nullable ReadableMap source) {
Glide
.with(view.getContext().getApplicationContext())
.load(glideUrl)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.dontTransform()
.priority(priority)
.placeholder(TRANSPARENT_DRAWABLE)
Expand Down

0 comments on commit de4f40a

Please sign in to comment.