We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在CacheAbleRequest类中, public void onRequestFail(FailData failData) {}方法中的 if(null != this.mHandler) { this.mHandler.onRequestFail(failData); if(this.mCacheData != null && !this.cacheIsDisabled() && !this.mUseCacheAnyway) { this.notifyRequestFinish(CacheAbleRequest.ResultType.USE_CACHE_ON_FAIL, this.mCacheData, true); } } 这段代码在满足条件的情况下会执行onRequestFail和notifyRequestFinish,导致回调时执行onRequestFail和onCacheAbleRequestFinish方法。对于APP来说判断不好使用,既执行了失败,又成功返回了结果。如果在不影响其他功能的情况下,建议改为 if(null != this.mHandler) {
if(this.mCacheData != null && !this.cacheIsDisabled() && !this.mUseCacheAnyway) { this.notifyRequestFinish(CacheAbleRequest.ResultType.USE_CACHE_ON_FAIL, this.mCacheData, true); }else{ this.mHandler.onRequestFail(failData); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在CacheAbleRequest类中, public void onRequestFail(FailData failData) {}方法中的
if(null != this.mHandler) {
this.mHandler.onRequestFail(failData);
if(this.mCacheData != null && !this.cacheIsDisabled() && !this.mUseCacheAnyway) {
this.notifyRequestFinish(CacheAbleRequest.ResultType.USE_CACHE_ON_FAIL, this.mCacheData, true);
}
}
这段代码在满足条件的情况下会执行onRequestFail和notifyRequestFinish,导致回调时执行onRequestFail和onCacheAbleRequestFinish方法。对于APP来说判断不好使用,既执行了失败,又成功返回了结果。如果在不影响其他功能的情况下,建议改为 if(null != this.mHandler) {
The text was updated successfully, but these errors were encountered: