Skip to content

Commit b37d1db

Browse files
author
hourunjing
committed
fix bug:web 端消息已标记为已读,ipad 端 消息列表下拉刷新,小红点不会消失
1 parent bd3542a commit b37d1db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CodingForiPad/ViewController/Message/COConversationListController.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ - (void)viewDidLoad {
9090

9191
[self.KVOController observe:[COUnReadCountManager manager] keyPath:@"messageCount" options:NSKeyValueObservingOptionInitial|NSKeyValueObservingOptionNew block:^(id observer, COUnReadCountManager *object, NSDictionary *change) {
9292
self.msgCountView.hidden = object.messageCount == 0 ? YES : NO;
93+
}];
94+
95+
[self.KVOController observe:[COUnReadCountManager manager] keyPath:@"notificationCount" options:NSKeyValueObservingOptionInitial|NSKeyValueObservingOptionNew block:^(id observer, COUnReadCountManager *object, NSDictionary *change) {
9396
self.notifCountView.hidden = object.notificationCount == 0 ? YES : NO;
9497
}];
9598

@@ -164,6 +167,7 @@ - (void)loadNotification
164167
&& responseObject.code == 0) {
165168
// TODO: show data
166169
[weakself reloadNotification:responseObject.data];
170+
[[COUnReadCountManager manager] updateCount];
167171
}
168172
} failure:^(NSError *error) {
169173
[weakself stopHud];
@@ -184,6 +188,7 @@ - (void)loadConversation
184188
&& responseObject.code == 0) {
185189
// TODO: show data
186190
[weakself reloadConversation:responseObject.data];
191+
[[COUnReadCountManager manager] updateCount];
187192
}
188193
} failure:^(NSError *error) {
189194
[weakself stopHud];

0 commit comments

Comments
 (0)