...
|
...
|
@@ -97,14 +97,13 @@ |
|
|
{
|
|
|
|
|
|
__weak typeof (self) weakSelf = self;
|
|
|
__strong typeof (weakSelf) strongSelf = weakSelf;
|
|
|
|
|
|
if (itemDic && ![itemDic isEqual:[NSNull null]] && !IsStrEmpty([itemDic objectForKey:@"name"])) {
|
|
|
if (0) {
|
|
|
// [self greenChannel:itemDic];
|
|
|
} else {
|
|
|
|
|
|
if ([[itemDic objectForKey:@"cmd"] longValue] == 4 && !self.manualScrolling) {
|
|
|
if ([[itemDic objectForKey:@"cmd"] longValue] == 4/*user join*/ && !self.manualScrolling) {
|
|
|
// 如果是用户加入的消息,则不加入到缓冲区
|
|
|
[self newUserJoin:itemDic];
|
|
|
} else {
|
...
|
...
|
@@ -112,8 +111,13 @@ |
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
|
YH_BarrageMsgModel *message = [[YH_BarrageMsgModel alloc]initWithDictionary:itemDic error:nil];
|
|
|
if (_messageBuffer) {
|
|
|
[_messageBuffer enqueue:message];
|
|
|
} else {
|
|
|
_messageBuffer = [NSMutableArray new];
|
|
|
[_messageBuffer enqueue:message];
|
|
|
}
|
|
|
|
|
|
[strongSelf->_messageBuffer enqueue:message];
|
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
if (weakSelf.manualScrolling) {
|
...
|
...
|
|