|
@@ -138,11 +138,16 @@ class HomeActivity : BaseXActivity<ActivityHomeBinding>(), IPayCallback {
|
|
|
conversationListener = object : V2TIMConversationListener(){
|
|
|
override fun onTotalUnreadMessageCountChanged(totalUnreadCount: Long) {
|
|
|
super.onTotalUnreadMessageCountChanged(totalUnreadCount)
|
|
|
+ val systemCount = SpUtil.readString("systemCount")
|
|
|
+ if (!systemCount.isNullOrEmpty()){
|
|
|
+ unreadMessageVm.systemMessage = systemCount.toLong()
|
|
|
+ }
|
|
|
unreadMessageVm.setTotalUnreadCount(totalUnreadCount)
|
|
|
}
|
|
|
}
|
|
|
IMUtil.updateUnreadMessageCount(conversationListener!!)
|
|
|
homeVm.systemMessageFun = {
|
|
|
+ SpUtil.putString("systemCount" , it.unreadTotal.toString())
|
|
|
unreadMessageVm.setSystemUnreadCount(it.unreadTotal)
|
|
|
}
|
|
|
}
|