!177 修改ImageKnife跳过网络,从内存中获取图片 cacheType参数未使用bug

Merge pull request !177 from 面条侠/master
This commit is contained in:
openharmony_ci 2024-04-10 09:28:53 +00:00 committed by Gitee
commit 80550c27a6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,6 @@
## 2.1.2-rc.13
- 修改ImageKnife跳过网络从内存中获取图片 cacheType参数未使用bug
## 2.1.2-rc.12
- 新增gif播放次数功能
- 新增磁盘预加载返回文件路径接口prefetchToDiskCache
@ -5,6 +8,7 @@
- 删除多余操作磁盘记录读写
- 清除定时器改为Gif图时清除
- uuid改为util.generateRandomUUID()
- 修改ImageKnife跳过网络从内存中获取图片 cacheType参数未使用bug
## 2.1.2-rc.11
- 修复设置磁盘容量最大值出现闪退

View File

@ -343,19 +343,19 @@ export class ImageKnife {
resolve(imageKnifeData);
}
let loadError = (err ?: BusinessError | string) => {
if (request.cacheType == CacheType.Default) {
if (cacheType == CacheType.Default) {
this.loadMemoryDiskIsUrl(request, loadComplete, loadError);
}
reject(err);
}
if (request.cacheType == CacheType.Cache) {
if (cacheType == CacheType.Cache) {
this.loadMemoryCacheIsUrl(request, loadComplete, loadError);
} else if (request.cacheType == CacheType.Disk) {
} else if (cacheType == CacheType.Disk) {
this.loadMemoryDiskIsUrl(request, loadComplete, loadError);
}
else if (request.cacheType == CacheType.Default) {
else if (cacheType == CacheType.Default) {
this.loadMemoryCacheIsUrl(request, loadComplete, loadError);
}
})

View File

@ -95,7 +95,6 @@ export class RequestOption {
addHeaderMap(map: Map<string, Object>) {
this.headers = map;
}
cacheType: CacheType = CacheType.Disk;
// 优先级
priority: Priority = Priority.MEDIUM;