Explorar el Código

格式化打印json;
主页没有更多状态更新优化

zengjiebin hace 7 años
padre
commit
d656927994

+ 3 - 2
app/src/main/java/com/sheep/gamegroup/model/util/LogInterceptor.java

@@ -3,6 +3,7 @@ package com.sheep.gamegroup.model.util;
 import android.text.TextUtils;
 
 import com.sheep.gamegroup.model.api.BaseMessageConverter;
+import com.sheep.gamegroup.util.StringUtils;
 
 import java.io.EOFException;
 import java.io.IOException;
@@ -112,7 +113,7 @@ public class LogInterceptor implements Interceptor {
                         if (isPlaintext(buffer)) {
                             String result = buffer.readString(charset);
                             String json = BaseMessageConverter.decrypt(result);
-                            this.logger.log(isDecrypt && !TextUtils.equals(result, json) ? "\n" + result + "\n" + json : "\n" + json);
+                            this.logger.log(isDecrypt && !TextUtils.equals(result, json) ? "\n" + result + "\n" + StringUtils.parseJson(json) : "\n" + StringUtils.parseJson(json));
                             this.logger.log("--> END " + request.method() + " (" + requestBody.contentLength() + "-byte body)");
                         } else {
                             this.logger.log("--> END " + request.method() + " (binary " + requestBody.contentLength() + "-byte body omitted)");
@@ -188,7 +189,7 @@ public class LogInterceptor implements Interceptor {
                             this.logger.log("");
                             String result = buffer.clone().readString(charset);
                             String json = BaseMessageConverter.decrypt(result);
-                            this.logger.log(isDecrypt && !TextUtils.equals(result, json) ? "\n" + result + "\n" + json : "\n" + json);
+                            this.logger.log(isDecrypt && !TextUtils.equals(result, json) ? "\n" + result + "\n" + StringUtils.parseJson(json) : "\n" + StringUtils.parseJson(json));
                         }
 
                         if (gzippedLength != null) {

+ 3 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtHomeTaskReleaseList.java

@@ -250,6 +250,9 @@ public class FgtHomeTaskReleaseList extends BaseFragment implements TryMakeMoney
         }
         if(noMoreRelease && noMoreReleaseBegin){
             noMore = true;
+            if(smartRefreshLayout != null && getUserVisibleHint()) {
+                smartRefreshLayout.setNoMoreData(noMore);
+            }
         }
         notifyDataSetChanged();
     }