Переглянути джерело

Merge remote-tracking branch 'origin/master' into sheep_tinker_3.0.2

zengjiebin 7 роки тому
батько
коміт
d9fa551fa1

+ 1 - 1
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -1548,7 +1548,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
      */
     private void addNewTask() {
 
-        if (onResumeCount == 0 && CommonUtil.getInstance().addNewTask(activity, userEntity) && homeListEntitysGridview != null)//第一次才调用
+        if (CommonUtil.getInstance().addNewTask(activity, userEntity) && homeListEntitysGridview != null)
         {
             HomeListEntity homeListEntityNewTask = new HomeListEntity();
             homeListEntityNewTask.setTitle("新手任务");

+ 1 - 44
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -1854,50 +1854,7 @@ public class CommonUtil {
         if (userEntity.getIs_new() == 2) { //1新用户 2老用户
             return false;
         } else {
-            NewbieTaskRecord newbie_task_record = null;
-            try {
-                newbie_task_record = MyDbManager.getInstance().dbFindNewbieTaskRecord(userEntity.getInvitation_code());
-            } catch (DbException e) {
-                e.printStackTrace();
-            }
-            boolean dontShowNewbieTaskDialog = newbie_task_record == null || newbie_task_record.isDontShowNewbieTaskDialog();//默认可以显示对话框
-            if (!userEntity.isNewRegistUser() || dontShowNewbieTaskDialog) {
-                final NewbieTaskRecord finalNewbie_task_record = newbie_task_record;
-                SheepApp.getInstance().getNetComponent().getApiService().getNewbieTask()
-                        .subscribeOn(Schedulers.io())
-                        .observeOn(AndroidSchedulers.mainThread())
-                        .subscribe(new SheepSubscriber<BaseMessage>(activity) {
-                            @Override
-                            public void onNext(BaseMessage baseMessage) {
-                                List<NewbieTask> newbieTaskList = baseMessage.getDatas(NewbieTask.class);
-                                if (newbieTaskList != null && !newbieTaskList.isEmpty() && newbieTaskList.size() > 1 && !newbieTaskList.get(1).getFinished()) {//了解小绵羊任务未完成时
-//                                    DialogNewbieTaskRegistSuccess.showDialog(activity, finalNewbie_task_record, newbieTaskList.get(0));
-                                } else if (newbieTaskList != null && !newbieTaskList.isEmpty()) {
-                                    finalNewbie_task_record.setDontShowNewbieTaskDialog(true);
-                                    MyDbManager.getInstance().saveOrUpdate(finalNewbie_task_record);//设置为不再显示新手对话框
-                                    List<NewbieTask> taskList = new ArrayList<>();
-                                    NewbieTask task = null;
-                                    for (NewbieTask newbieTask : newbieTaskList) {
-                                        if (newbieTask.getFinished()) {//已经完成
-                                            task = newbieTask;
-                                        } else {
-                                            taskList.add(newbieTask);
-                                        }
-                                    }
-                                    DialogNewbieTask1.showDialog(activity, taskList, task);
-                                } else {
-                                    if (BuildConfig.DEBUG)
-                                        G.showToast("测试:服务器数据错误,新手任务数据为空");
-                                }
-                            }
-
-                            @Override
-                            public void onError(BaseMessage baseMessage) {
-                            }
-                        });
-            }
-            return true;
-        }
+            return true;        }
     }
 
     /**

+ 22 - 22
app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAct.java

@@ -1012,28 +1012,28 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
     protected void onGetImage(String path) {
 
     }
-    private ICallBack<String> callBack = new ICallBack<String>() {
-        @Override
-        public String call(Object... args) {
-            String pngFilePath = (String) args[0];
-            int size = (int) args[1];
-            int index = (int) args[2];
-            try {
-                //加密文本内容:包名;签名md5;试玩应用包名;试玩应用签名md5;任务id;图片总数;图片位置
-                return PngUtil.decodePng(pngFilePath, taskEty.getPackage_names(), String.format(Locale.CHINA, "%d;%d;%d", commitScreenShotTaskId, size, index));
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-            return null;
-        }
-    };
-    /**
-     * 上传图片前的回调
-     * @return
-     */
-    protected ICallBack<String> getCallBack(){
-        return callBack;
-    }
+//    private ICallBack<String> callBack = new ICallBack<String>() {
+//        @Override
+//        public String call(Object... args) {
+//            String pngFilePath = (String) args[0];
+//            int size = (int) args[1];
+//            int index = (int) args[2];
+//            try {
+//                //加密文本内容:包名;签名md5;试玩应用包名;试玩应用签名md5;任务id;图片总数;图片位置
+//                return PngUtil.decodePng(pngFilePath, taskEty.getPackage_names(), String.format(Locale.CHINA, "%d;%d;%d", commitScreenShotTaskId, size, index));
+//            } catch (Exception e) {
+//                e.printStackTrace();
+//            }
+//            return null;
+//        }
+//    };
+//    /**
+//     * 上传图片前的回调
+//     * @return
+//     */
+//    protected ICallBack<String> getCallBack(){
+//        return callBack;
+//    }
     private int commitScreenShotTaskId;
 
     @Override