diff --git a/build.gradle b/build.gradle index 51aa9d6c..98c4146c 100644 --- a/build.gradle +++ b/build.gradle @@ -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'] = [ diff --git a/markwon-image-coil/src/main/java/io/noties/markwon/image/coil/CoilImagesPlugin.java b/markwon-image-coil/src/main/java/io/noties/markwon/image/coil/CoilImagesPlugin.java index 5d15dcfd..b71543a7 100644 --- a/markwon-image-coil/src/main/java/io/noties/markwon/image/coil/CoilImagesPlugin.java +++ b/markwon-image-coil/src/main/java/io/noties/markwon/image/coil/CoilImagesPlugin.java @@ -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; @@ -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(); } @@ -57,7 +56,7 @@ public LoadRequest load(@NonNull AsyncDrawable drawable) { public void cancel(@NonNull RequestDisposable disposable) { disposable.dispose(); } - }, Coil.loader()); + }, Coil.imageLoader(context)); } @NonNull @@ -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(); } @@ -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); }