|
|
@@ -64,7 +64,7 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
"D", "理疗通知" -> {
|
|
|
if (TextUtils.isEmpty(bean.ext)) {
|
|
|
val messageDialog = MessageDialog()
|
|
|
- messageDialog.setContent(bean.id, bean.msgDesn, bean.msgTitle)
|
|
|
+ messageDialog.setContent(bean.getMsgIdInfo(), bean.getMsgDesnInfo(), bean.getMsgTitleInfo())
|
|
|
messageDialog.show(supportFragmentManager, "messageDialog")
|
|
|
} else {
|
|
|
JumpUtil.jumpActivityWithUrl(
|
|
|
@@ -77,7 +77,7 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
"C", "报告提醒" -> {
|
|
|
if (TextUtils.isEmpty(bean.ext)) {
|
|
|
val messageDialog = MessageDialog()
|
|
|
- messageDialog.setContent(bean.id, bean.msgDesn, bean.msgTitle)
|
|
|
+ messageDialog.setContent(bean.getMsgIdInfo(), bean.getMsgDesnInfo(), bean.getMsgTitleInfo())
|
|
|
messageDialog.show(supportFragmentManager, "messageDialog")
|
|
|
} else {
|
|
|
JumpUtil.jumpActivityWithUrl(
|
|
|
@@ -89,7 +89,7 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
}
|
|
|
else -> {
|
|
|
val messageDialog = MessageDialog()
|
|
|
- messageDialog.setContent(bean.id, bean.msgDesn, bean.msgTitle)
|
|
|
+ messageDialog.setContent(bean.getMsgIdInfo(), bean.getMsgDesnInfo(), bean.getMsgTitleInfo())
|
|
|
messageDialog.show(supportFragmentManager, "messageDialog")
|
|
|
}
|
|
|
}
|
|
|
@@ -106,11 +106,6 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
}
|
|
|
|
|
|
override fun initData() {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- override fun onResume() {
|
|
|
- super.onResume()
|
|
|
getPushList()
|
|
|
getMeaageList()
|
|
|
}
|
|
|
@@ -119,17 +114,17 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
* 获取推送消息类型
|
|
|
*/
|
|
|
private fun getPushList() {
|
|
|
- pushTypeList.clear()
|
|
|
- pushTypeList.add(
|
|
|
- PushMessageTypeBean(
|
|
|
- dictLabel = "全部消息",
|
|
|
- dictValue = "",
|
|
|
- dictType = "game_type"
|
|
|
- )
|
|
|
- )
|
|
|
viewModel.getSelectByDictType(fail = {
|
|
|
it.toast()
|
|
|
}, success = {
|
|
|
+ pushTypeList.clear()
|
|
|
+ pushTypeList.add(
|
|
|
+ PushMessageTypeBean(
|
|
|
+ dictLabel = "全部消息",
|
|
|
+ dictValue = "",
|
|
|
+ dictType = "game_type"
|
|
|
+ )
|
|
|
+ )
|
|
|
if (it.isNullOrEmpty().not()) {
|
|
|
pushTypeList.addAll(it!!)
|
|
|
}
|
|
|
@@ -141,11 +136,11 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
* 获取推送消息列表
|
|
|
*/
|
|
|
private fun getMeaageList() {
|
|
|
- pushList.clear()
|
|
|
- pushListAdapter.clearData()
|
|
|
viewModel.getPushList(msgType, fail = {
|
|
|
it.toast()
|
|
|
}, success = {
|
|
|
+ pushList.clear()
|
|
|
+ pushListAdapter.clearData()
|
|
|
if (it.isNullOrEmpty().not()) {
|
|
|
pushList.addAll(it!!)
|
|
|
}
|
|
|
@@ -162,10 +157,8 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
it.toast()
|
|
|
}, success = {
|
|
|
if (pushListAdapter.data.isNullOrEmpty().not()) {
|
|
|
- if (pushListAdapter.data.get(position) != null) {
|
|
|
- pushListAdapter.data[position].status = "0"
|
|
|
- pushListAdapter.notifyItemChanged(position)
|
|
|
- }
|
|
|
+ pushListAdapter.data[position].status = "0"
|
|
|
+ pushListAdapter.notifyItemChanged(position)
|
|
|
}
|
|
|
})
|
|
|
}
|