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