1.修复数据存入磁盘,有文件但是文件内容为空的情况.应该需要重新进行数据源fetch操作比如(网络下载)
Signed-off-by: zhoulisheng1 <zhoulisheng1@huawei.com>
This commit is contained in:
parent
62b4dd16ad
commit
347041e950
|
@ -450,7 +450,6 @@ export class RequestOption {
|
||||||
|
|
||||||
loadError(err) {
|
loadError(err) {
|
||||||
LogUtil.log("loadError:" + err);
|
LogUtil.log("loadError:" + err);
|
||||||
LogUtil.log("loadError stack=:" + JSON.stringify(err.stack));
|
|
||||||
//失败占位图展示规则
|
//失败占位图展示规则
|
||||||
if (this.retryholderFunc) {
|
if (this.retryholderFunc) {
|
||||||
// 重试图层优先于加载失败展示
|
// 重试图层优先于加载失败展示
|
||||||
|
|
|
@ -245,7 +245,7 @@ export class RequestManager {
|
||||||
private loadDiskFromSource(request: RequestOption, onComplete, onError) {
|
private loadDiskFromSource(request: RequestOption, onComplete, onError) {
|
||||||
LogUtil.log("RequestManager loadDiskFromSource")
|
LogUtil.log("RequestManager loadDiskFromSource")
|
||||||
let cached = this.mDiskCacheProxy.getValue(request.generateDataKey)
|
let cached = this.mDiskCacheProxy.getValue(request.generateDataKey)
|
||||||
if (cached != null) {
|
if (cached != null && cached.byteLength > 0) {
|
||||||
this.parseDiskFile2PixelMap(request, cached, onComplete, onError)
|
this.parseDiskFile2PixelMap(request, cached, onComplete, onError)
|
||||||
} else {
|
} else {
|
||||||
this.mStage = Stage.SOURCE;
|
this.mStage = Stage.SOURCE;
|
||||||
|
|
Loading…
Reference in New Issue