|
@@ -27,6 +27,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
|
import com.kfzs.duanduan.BaseCompatFragment;
|
|
import com.kfzs.duanduan.BaseCompatFragment;
|
|
|
import com.kfzs.duanduan.event.BigEvent;
|
|
import com.kfzs.duanduan.event.BigEvent;
|
|
|
|
|
+import com.kfzs.duanduan.react.SharedPreferences;
|
|
|
import com.layoutscroll.layoutscrollcontrols.view.EasyLayoutScroll;
|
|
import com.layoutscroll.layoutscrollcontrols.view.EasyLayoutScroll;
|
|
|
import com.sheep.gamegroup.di.components.DaggerSmallSheepComponent;
|
|
import com.sheep.gamegroup.di.components.DaggerSmallSheepComponent;
|
|
|
import com.sheep.gamegroup.di.modules.SmallSheepModule;
|
|
import com.sheep.gamegroup.di.modules.SmallSheepModule;
|
|
@@ -272,9 +273,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
.preload(800, 800);
|
|
.preload(800, 800);
|
|
|
if(userEntity.getNewbie_task_status() < 15){//为15时代表已经完成所有新手任务,不是新手
|
|
if(userEntity.getNewbie_task_status() < 15){//为15时代表已经完成所有新手任务,不是新手
|
|
|
newbie_task.setVisibility(View.VISIBLE);
|
|
newbie_task.setVisibility(View.VISIBLE);
|
|
|
- if(isShowNewbieTaskDialog){
|
|
|
|
|
- isShowNewbieTaskDialog = false;
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ boolean isShowNewbieTaskDialog = SharedPreferences.getInstance().getBoolean("isShowNewbieTaskDialog", true);//默认可以显示对话框
|
|
|
|
|
+ if(!isShowNewbieTaskDialog){
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
SheepApp.getInstance().getNetComponent().getApiService().getNewbieTask()
|
|
SheepApp.getInstance().getNetComponent().getApiService().getNewbieTask()
|
|
@@ -287,6 +287,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
if(BinaryUtil.isInt(userEntity.getNewbie_task_status(),0, 0)){//第一个任务未完成
|
|
if(BinaryUtil.isInt(userEntity.getNewbie_task_status(),0, 0)){//第一个任务未完成
|
|
|
DialogNewbieTaskRegistSuccess.showDialog(getActivity());
|
|
DialogNewbieTaskRegistSuccess.showDialog(getActivity());
|
|
|
} else if(newbieTaskList != null && !newbieTaskList.isEmpty()){
|
|
} else if(newbieTaskList != null && !newbieTaskList.isEmpty()){
|
|
|
|
|
+ SharedPreferences.getInstance().putBoolean("isShowNewbieTaskDialog", false);//设置为不再显示新手对话框
|
|
|
List<NewbieTask> taskList = new ArrayList<>();
|
|
List<NewbieTask> taskList = new ArrayList<>();
|
|
|
NewbieTask task = null;
|
|
NewbieTask task = null;
|
|
|
for (NewbieTask newbieTask : newbieTaskList) {
|
|
for (NewbieTask newbieTask : newbieTaskList) {
|
|
@@ -314,7 +315,6 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
}
|
|
}
|
|
|
//添加代码请在上面的if else之前,否则出错不要找我 by realicing
|
|
//添加代码请在上面的if else之前,否则出错不要找我 by realicing
|
|
|
}
|
|
}
|
|
|
- private boolean isShowNewbieTaskDialog = true;//只有首次会显示未做的新手任务对话框
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void failData2View(Object o) {
|
|
public void failData2View(Object o) {
|
|
|
G.showToast("网络错误");
|
|
G.showToast("网络错误");
|