|
|
@ -86,9 +86,9 @@ object BookCover { |
|
|
|
loadOnlyWifi: Boolean = false |
|
|
|
loadOnlyWifi: Boolean = false |
|
|
|
): RequestBuilder<Drawable> { |
|
|
|
): RequestBuilder<Drawable> { |
|
|
|
val loadBlur = ImageLoader.load(context, defaultDrawable) |
|
|
|
val loadBlur = ImageLoader.load(context, defaultDrawable) |
|
|
|
.apply(RequestOptions.bitmapTransform(BlurTransformation(25))) |
|
|
|
.transform(BlurTransformation(25)) |
|
|
|
return if (AppConfig.useDefaultCover) { |
|
|
|
return if (AppConfig.useDefaultCover) { |
|
|
|
loadBlur.centerCrop() |
|
|
|
loadBlur |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
val options = RequestOptions().set(OkHttpModelLoader.loadOnlyWifiOption, loadOnlyWifi) |
|
|
|
val options = RequestOptions().set(OkHttpModelLoader.loadOnlyWifiOption, loadOnlyWifi) |
|
|
|
ImageLoader.load(context, path) |
|
|
|
ImageLoader.load(context, path) |
|
|
@ -96,7 +96,6 @@ object BookCover { |
|
|
|
.transform(BlurTransformation(25)) |
|
|
|
.transform(BlurTransformation(25)) |
|
|
|
.transition(DrawableTransitionOptions.withCrossFade(1500)) |
|
|
|
.transition(DrawableTransitionOptions.withCrossFade(1500)) |
|
|
|
.thumbnail(loadBlur) |
|
|
|
.thumbnail(loadBlur) |
|
|
|
.centerCrop() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|