|
|
@@ -13,6 +13,7 @@ import com.kfzs.duanduan.utils.NumberFormatUtils;
|
|
|
import com.sheep.gamegroup.model.api.BaseMessageConverter;
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
import com.sheep.gamegroup.model.entity.ScreenShotConfig;
|
|
|
+import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
|
|
|
import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
import com.sheep.jiuyan.samllsheep.BuildConfig;
|
|
|
@@ -583,6 +584,31 @@ public class DataUtil {
|
|
|
return intent.putExtra(key, JSONObject.toJSONString(t));
|
|
|
}
|
|
|
|
|
|
+ public static final String KEY_HAS_READ_AATI_LIST = "hasReadAppointAcceptedTaskIdList";
|
|
|
+ public static final String KEY_NOT_READ_AATI_LIST = "notReadAppointAcceptedTaskIdList";
|
|
|
+ //检查是否有未读取的列表
|
|
|
+ public boolean checkAppointList(List<TaskAcceptedEty> list) {
|
|
|
+ List<String> idList = JSON.parseArray(DataUtil.getAsString(KEY_HAS_READ_AATI_LIST, "[]"), String.class);
|
|
|
+ List<String> notReadIdList = JSON.parseArray(DataUtil.getAsString(KEY_NOT_READ_AATI_LIST, "[]"), String.class);
|
|
|
+ ListUtil.findIList(list, item -> {
|
|
|
+ boolean result = item != null && item.getRelease_task() != null && item.getRelease_task().isAppointTask() && item.isFinish() && !idList.isEmpty() && !idList.contains(String.valueOf(item.getId()));//是定向奖励,且可以兑换,且已经忽略的列表不包含它
|
|
|
+ if(result) {
|
|
|
+ notReadIdList.add(String.valueOf(item.getId()));
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ });
|
|
|
+ DataUtil.putAsString(KEY_NOT_READ_AATI_LIST, JSON.toJSONString(notReadIdList));
|
|
|
+ return !notReadIdList.isEmpty();//未读的不为空就显示红点
|
|
|
+ }
|
|
|
+ //将未读取的列表添加到已经读取的列表
|
|
|
+ public void readAppointList() {
|
|
|
+ List<String> idList = JSON.parseArray(DataUtil.getAsString(KEY_HAS_READ_AATI_LIST, "[]"), String.class);
|
|
|
+ List<String> notReadIdList = JSON.parseArray(DataUtil.getAsString(KEY_NOT_READ_AATI_LIST, "[]"), String.class);
|
|
|
+ ListUtil.addAll(idList, notReadIdList);
|
|
|
+ DataUtil.putAsString(KEY_HAS_READ_AATI_LIST, JSON.toJSONString(idList));
|
|
|
+ DataUtil.putAsString(KEY_NOT_READ_AATI_LIST, "[]");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//-----------------------------------------数据转换部分-----------------------------------------------------结束
|
|
|
}
|