Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Coil Version #244

Merged
merged 2 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ext {
'dagger' : "com.google.dagger:dagger:$daggerVersion",
'picasso' : 'com.squareup.picasso:picasso:2.71828',
'glide' : 'com.github.bumptech.glide:glide:4.9.0',
'coil' : 'io.coil-kt:coil:0.8.0'
'coil' : 'io.coil-kt:coil:0.10.1'
]

deps['annotationProcessor'] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import coil.Coil;
import coil.ImageLoader;
import coil.api.ImageLoaders;
import coil.request.LoadRequest;
import coil.request.RequestDisposable;
import coil.target.Target;
Expand Down Expand Up @@ -48,7 +47,7 @@ public static CoilImagesPlugin create(@NonNull final Context context) {
@NonNull
@Override
public LoadRequest load(@NonNull AsyncDrawable drawable) {
return ImageLoaders.newLoadBuilder(Coil.loader(), context)
return LoadRequest.builder(context)
.data(drawable.getDestination())
.build();
}
Expand All @@ -57,7 +56,7 @@ public LoadRequest load(@NonNull AsyncDrawable drawable) {
public void cancel(@NonNull RequestDisposable disposable) {
disposable.dispose();
}
}, Coil.loader());
}, Coil.imageLoader(context));
}

@NonNull
Expand All @@ -67,7 +66,7 @@ public static CoilImagesPlugin create(@NonNull final Context context,
@NonNull
@Override
public LoadRequest load(@NonNull AsyncDrawable drawable) {
return ImageLoaders.newLoadBuilder(imageLoader, context)
return LoadRequest.builder(context)
.data(drawable.getDestination())
.build();
}
Expand Down Expand Up @@ -129,7 +128,7 @@ public void load(@NonNull AsyncDrawable drawable) {
LoadRequest request = coilStore.load(drawable).newBuilder()
.target(target)
.build();
RequestDisposable disposable = imageLoader.load(request);
RequestDisposable disposable = imageLoader.execute(request);
cache.put(drawable, disposable);
}

Expand Down