mikaelzero / mojito

微信、bilibili大图、长图、gif、视频、自定义view的转场效果,The transition effect of wechat, bilibili large image, long image, GIF, video and custom view
Apache License 2.0
1.51k stars 164 forks source link

清空缓存之后再次加载图片失败 #114

Open HehuanAndroid opened 2 years ago

HehuanAndroid commented 2 years ago

WebStorage.getInstance().deleteAllData()

           (BaseFileUtils.deleteAllInDir(context.cacheDir) && BaseFileUtils.deleteAllInDir(context.externalCacheDir)

。。。。。

.target(object : ImageDownloadTarget(uri?.toString().orEmpty()) { override fun onSuccess(result: Drawable) { super.onSuccess(result) val resource = uri.getCoilCacheFile() YzLog.e(" resource >>>>>>>>>>> $resource") if (resource?.exists() == true) { callback?.onSuccess(resource) } else { callback?.onFail(CoilLoaderException(null)) } } uri.getCoilCacheFile() 这个会报空 走onFail 这个要怎么处理

mikaelzero commented 1 year ago

这用的是哪个图片加载框架? 如果不是仓库中的某一个,需要做适配的