-
-
Notifications
You must be signed in to change notification settings - Fork 375
Closed
Labels
Description
- Markwon version: 4.4.0
When using the coil plugin and applying transformations as explained in the documentation images are not displayed (only the placeholder appears) when returning to a previously displayed TextView with markdown.
It doesn't seem to matter which transformations you use and how many. Removing the transformations makes the issue go away.
Markwon configuration:
Markwon.builder(activity)
.usePlugin(
CoilImagesPlugin.create(
object : CoilImagesPlugin.CoilStore {
override fun load(drawable: AsyncDrawable): LoadRequest {
return LoadRequest.Builder(context)
.transformations(
RoundedCornersWithoutCropTransformation(14f)
)
.data(drawable.destination)
.placeholder(R.drawable.image_placeholder)
.build()
}
override fun cancel(disposable: RequestDisposable) {
disposable.dispose()
}
},
ImageLoader.Builder(activity)
.okHttpClient(okHttpClient)
.placeholder(R.drawable.image_placeholder)
.build()
)
)
.build()
Steps to reproduce:
- Open a fragment with a TextView that is populated using Markwon with some markdown containing images.
- Put the app to background.
- Reopen the app from recents.
- Observe: the images are not displayed anymore (only placeholders are shown). If an image didn't load in step 2 (e.g. you advanced too quickly or the loading failed) it will load now (if not blocked by some external factors), but also just once.