|
|
@@ -19,7 +19,6 @@ import com.yingyangfly.baselib.bean.GetSaveGameRecordBean
|
|
|
import com.yingyangfly.baselib.bean.MessageBean
|
|
|
import com.yingyangfly.baselib.bean.Record
|
|
|
import com.yingyangfly.baselib.db.VoicePlayerBean
|
|
|
-import com.yingyangfly.baselib.dialog.TaskFragment
|
|
|
import com.yingyangfly.baselib.dialog.TipsDialog
|
|
|
import com.yingyangfly.baselib.ext.getEndAnimation
|
|
|
import com.yingyangfly.baselib.ext.getScaleAnimation
|
|
|
@@ -190,25 +189,9 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
binding.tvPlayPorpoise.post {
|
|
|
showPlayPorpoiseView()
|
|
|
}
|
|
|
- } else {
|
|
|
- //获取任务状态弹窗
|
|
|
- getSelectHomePageMsg()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 查询首页任务提醒弹窗是否显示接口
|
|
|
- */
|
|
|
- private fun getSelectHomePageMsg() {
|
|
|
- viewModel.getSelectHomePageMsg("D", fail = {
|
|
|
- it.toast()
|
|
|
- }, success = {
|
|
|
- if (it != null) {
|
|
|
- showTaskDialog(it.msgDesn, it.id)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 获取脑力值和训练时长接口
|
|
|
*/
|
|
|
@@ -317,29 +300,6 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
.show(supportFragmentManager)
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 欢迎/确定信息弹窗
|
|
|
- */
|
|
|
- private fun showTaskDialog(content: String, id: String) {
|
|
|
- val taskFragment = TaskFragment()
|
|
|
- taskFragment.setTaskDesn(content, id)
|
|
|
- taskFragment.onDialogClickListener = {
|
|
|
- updateReadMsg(id)
|
|
|
- }
|
|
|
- taskFragment.show(supportFragmentManager, "taskFragment")
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 修改未读消息状态
|
|
|
- */
|
|
|
- private fun updateReadMsg(id: String) {
|
|
|
- viewModel.updateReadMsg(id, fail = {
|
|
|
- getFindMyTask()
|
|
|
- }, success = {
|
|
|
- getFindMyTask()
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 加载游戏数据
|
|
|
*/
|
|
|
@@ -473,8 +433,6 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
}
|
|
|
|
|
|
override fun onDismiss() {
|
|
|
- //获取任务状态弹窗
|
|
|
- getSelectHomePageMsg()
|
|
|
}
|
|
|
})
|
|
|
builder.addComponent(ShowFunTimeViewComponent())
|