Commit 1ca4aa0a authored by pete谢兆麟's avatar pete谢兆麟

Merge commit '6dc9ad73' into xiezhaolin

parents 0d5a9353 6dc9ad73
...@@ -165,9 +165,14 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -165,9 +165,14 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(clearUnreadBadge), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil)
} }
deinit {
NotificationCenter.default.removeObserver(self)
}
func requestLikeCollectionCount() { func requestLikeCollectionCount() {
self.likeViewModel.getLikeCollectionRecentScanCountInfo { self.likeViewModel.getLikeCollectionRecentScanCountInfo {
[weak self] success, error in [weak self] success, error in
...@@ -193,9 +198,19 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -193,9 +198,19 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
self.tableView .reloadData() self.tableView .reloadData()
} }
} }
} }
}
@objc func clearUnreadBadge() {
DispatchQueue.main.async {
for item in self.items {
if item.type == .myMessage {
item.isShowRedPoint = false
break
}
}
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