Skip to content

Commit

Permalink
格式化
Browse files Browse the repository at this point in the history
  • Loading branch information
microshow committed Sep 4, 2020
1 parent 84f8363 commit 7305bac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public CommonNetBoundResource(CachePolicyMode cachePolicyMode) {
T cacheData = getCacheResult(cacheKey);
if (cacheData != null) {
emitter.onNext(Resource.success(cacheData, true));
Thread.sleep(100);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static Error unKnowError() {
}

public static Error apiError(int code, String message) {
return new Error(code, code + ": " + message);
return new Error(code, message);
}

private static String getString(@StringRes int resId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Flowable<Resource<MovieModel>> loadOneData(Map<String, String> params) {
String mCacheKey = this.getClass().getName()
+ "." + Thread.currentThread().getStackTrace()[2].getMethodName()
+ "." + params.hashCode();
return new CommonNetBoundResource<MovieModel>(CachePolicyMode.POLICY_NETWORK_ELSE_CACHE) {
return new CommonNetBoundResource<MovieModel>(CachePolicyMode.POLICY_CACHE_AND_NETWORK) {
@NonNull
@Override
protected Flowable fetchFromNet() {
Expand Down

0 comments on commit 7305bac

Please sign in to comment.