From a5d862051462a5fcc2717b405896a6d424002e54 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 22 十二月 2020 15:43:06 +0800
Subject: [PATCH] 1. 调整了数控实体的存储位置; 2. 新增数据表“媒体文件类型别名表”; 3. 修改任意拍模块,将图片分类改为根据场景类型动态生成,同时新增修改分类别名功能; 4. 优化子任务选择界面的任务排序方式,按照“待开始”、“执行中”、“未执行”的顺序进行排序;

---
 app/src/main/java/cn/flightfeather/thirdapp/adapter/TaskListAdapter.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/app/src/main/java/cn/flightfeather/thirdapp/adapter/TaskListAdapter.java b/app/src/main/java/cn/flightfeather/thirdapp/adapter/TaskListAdapter.java
index a4ad7a4..5670e4e 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/adapter/TaskListAdapter.java
+++ b/app/src/main/java/cn/flightfeather/thirdapp/adapter/TaskListAdapter.java
@@ -14,7 +14,7 @@
 import java.util.Objects;
 
 import cn.flightfeather.thirdapp.R;
-import cn.flightfeather.thirdapp.bean.Subtask;
+import cn.flightfeather.thirdapp.bean.entity.Subtask;
 import cn.flightfeather.thirdapp.util.Constant;
 import cn.flightfeather.thirdapp.util.DialogUtil2;
 import cn.flightfeather.thirdapp.util.Domain;
@@ -69,9 +69,10 @@
 
     @Override
     public void onBindViewHolder(TaskListHolder holder, final int position) {
+        int pos = holder.getAdapterPosition();
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm", Locale.getDefault());
         SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("MM鏈坉d鏃�", Locale.getDefault());
-        Subtask subTask = subTaskList.get(position);
+        Subtask subTask = subTaskList.get(pos);
         switch (holder.getItemViewType()) {
             case ITEM_VIEW_TYPE_HEAD:
                 Date date1 = subTask.getPlanstarttime();
@@ -91,8 +92,8 @@
                     holder.mtv_time.setText(planStartTime);
 
                     //瀵规槸鍚︽樉绀烘棩鏈熺殑鍒ゆ柇
-                    if (position>0){
-                        Subtask subTaskBefore = subTaskList.get(position-1);
+                    if (pos>0){
+                        Subtask subTaskBefore = subTaskList.get(pos-1);
                         Calendar calendarBefore = Calendar.getInstance();
                         calendarBefore.setTime(subTaskBefore.getPlanstarttime());
                         calendarBefore.set(Calendar.HOUR_OF_DAY,0);
@@ -136,7 +137,7 @@
                     @Override
                     public void onClick(View v) {
                         if (onSwipeItemClickListener != null) {
-                            onSwipeItemClickListener.click(position);
+                            onSwipeItemClickListener.click(pos);
                         }
                     }
                 });
@@ -146,7 +147,7 @@
                         @Override
                         public boolean onLongClick(View v) {
                             DialogUtil2.INSTANCE.showAlertDialog(context, "纭鏄惁鍒犻櫎浠诲姟?", dialog -> {
-                                onDeleteListener.delete(position);
+                                onDeleteListener.delete(pos);
                                 dialog.dismiss();
                                 return Unit.INSTANCE;
                             }, dialog -> {

--
Gitblit v1.9.3