Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

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

Open
HehuanAndroid opened this issue Jul 20, 2022 · 1 comment
Open

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

HehuanAndroid opened this issue Jul 20, 2022 · 1 comment

Comments

@HehuanAndroid
Copy link

HehuanAndroid commented Jul 20, 2022

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
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants