-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Description
Description
val normalUriString = "https://www.google.com.hk/logos/doodles/2020/stay-and-play-at-home-with-popular-past-google-doodles-halloween-2016-6753651837108773-s.png"
val 404UriString = "https://www.google.com.hk/404"
vImage.controller = Fresco.newDraweeControllerBuilder()
.setLowResImageRequest(ImageRequest.fromUri(Uri.parse(normalUriString)))
.setImageRequest(ImageRequest.fromUri(Uri.parse(404UriString)))
.setControllerListener(object : BaseControllerListener<ImageInfo>() {
override fun onFailure(id: String?, throwable: Throwable?) {
Log.e("TAG", "onFailure")
}
override fun onIntermediateImageSet(id: String?, imageInfo: ImageInfo?) {
Log.e("TAG", "onIntermediateImageSet")
}
override fun onFinalImageSet(id: String?, imageInfo: ImageInfo?, animatable: Animatable?) {
Log.e("TAG", "onFinalImageSet")
}
})
.setOldController(vImage.controller)
.build()
fun clearCache() {
Fresco.getImagePipeline().clearCaches()
}
expect:
E/TAG: onIntermediateImageSet
E/TAG: onFailure
actually:
It works the first time, but after calling clearCache a few times(call several times), It doesn't work:
E/TAG: onFinalImageSet
Reproduction
As shown above