Commit e38529d9 authored by Alex朱枝文's avatar Alex朱枝文

未读消息状态清空bug修复

parent 4c4c1651
...@@ -218,6 +218,8 @@ extension YHButlerServiceManager { ...@@ -218,6 +218,8 @@ extension YHButlerServiceManager {
// 清空已读消息后刷新最新消息状态 // 清空已读消息后刷新最新消息状态
lastMessage = getLastMessage() lastMessage = getLastMessage()
printLog("$$$$clearUnreadCount") printLog("$$$$clearUnreadCount")
unreadCount = 0
NotificationCenter.default.post(name: YhConstant.YhNotification.didQiYuUnReadMsgCountChangeNotification, object: nil)
} }
} }
......
...@@ -91,7 +91,7 @@ class YHHomePageViewController: YHBaseViewController { ...@@ -91,7 +91,7 @@ class YHHomePageViewController: YHBaseViewController {
} }
YHHUD.hide() YHHUD.hide()
if success { if success {
YHButlerServiceManager.shared.clearUnreadCount() // YHButlerServiceManager.shared.clearUnreadCount()
// 需要回到页面再刷新已读,因为不在当前页 // 需要回到页面再刷新已读,因为不在当前页
self.needUpdateMgrItem = true self.needUpdateMgrItem = true
} }
......
...@@ -424,7 +424,7 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -424,7 +424,7 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource {
YHHUD.hide() YHHUD.hide()
if success { if success {
YHButlerServiceManager.shared.clearUnreadCount() //YHButlerServiceManager.shared.clearUnreadCount()
if let managerSession = self.msgArr.first, managerSession.type == YHMessageType.yinheManager.rawValue { if let managerSession = self.msgArr.first, managerSession.type == YHMessageType.yinheManager.rawValue {
managerSession.unreadCount = 0 managerSession.unreadCount = 0
self.tableView.reloadData() self.tableView.reloadData()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment