Commit 511070eae7d4383332490614c19d23d6ae452ce2
1 parent
1b665afc
0.2.7 版本 1.发送商家版申请退款消息
2.解决首页偶发通讯录亮红点
Showing
4 changed files
with
24 additions
and
4 deletions
CNLiveNewIMAManagerKit.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveNewIMAManagerKit' | 10 | s.name = 'CNLiveNewIMAManagerKit' |
| 11 | - s.version = '0.2.6' | 11 | + s.version = '0.2.7' |
| 12 | s.summary = 'A short description of CNLiveNewIMAManagerKit.' | 12 | s.summary = 'A short description of CNLiveNewIMAManagerKit.' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveNewIMAManagerKit/Classes/Playform/IMAConversationManager.m
| @@ -1068,6 +1068,10 @@ | @@ -1068,6 +1068,10 @@ | ||
| 1068 | NSDictionary *topicData = dic[@"topicData"]; | 1068 | NSDictionary *topicData = dic[@"topicData"]; |
| 1069 | [[NSNotificationCenter defaultCenter] postNotificationName:kIMAMSG_PhotoFixSuccessNotification object:nil userInfo:topicData]; | 1069 | [[NSNotificationCenter defaultCenter] postNotificationName:kIMAMSG_PhotoFixSuccessNotification object:nil userInfo:topicData]; |
| 1070 | } | 1070 | } |
| 1071 | + else if ([dic[@"type"] integerValue] == CustomMsgTypeApplyForRefund) { | ||
| 1072 | + //商家版申请退款消息 | ||
| 1073 | + [[NSNotificationCenter defaultCenter] postNotificationName:kIMAMSG_ApplyForRefundNotification object:nil userInfo:dic]; | ||
| 1074 | + } | ||
| 1071 | return isBreak; | 1075 | return isBreak; |
| 1072 | } | 1076 | } |
| 1073 | 1077 |
CNLiveNewIMAManagerKit/Classes/Playform/IMAPlatform+FriendShip.m
| @@ -350,7 +350,7 @@ | @@ -350,7 +350,7 @@ | ||
| 350 | 350 | ||
| 351 | TIMFriendPendencyRequest *request = [[TIMFriendPendencyRequest alloc] init]; | 351 | TIMFriendPendencyRequest *request = [[TIMFriendPendencyRequest alloc] init]; |
| 352 | NSTimeInterval interval = [[NSDate date] timeIntervalSince1970]; | 352 | NSTimeInterval interval = [[NSDate date] timeIntervalSince1970]; |
| 353 | - double timestamp = interval; | 353 | + NSUInteger timestamp = interval; |
| 354 | request.timestamp = timestamp; | 354 | request.timestamp = timestamp; |
| 355 | 355 | ||
| 356 | int sep = 0; | 356 | int sep = 0; |
| @@ -363,10 +363,20 @@ | @@ -363,10 +363,20 @@ | ||
| 363 | 363 | ||
| 364 | /**标记是否有未读的好友邀请*/ | 364 | /**标记是否有未读的好友邀请*/ |
| 365 | BOOL isHasUnread = NO; | 365 | BOOL isHasUnread = NO; |
| 366 | - | 366 | + |
| 367 | + /**上次已读时间戳*/ | ||
| 368 | + NSUInteger lastTimestamp = 0 ; | ||
| 369 | + if ([[NSUserDefaults standardUserDefaults] objectForKey:kIMAMSG_PendencyTimestamp]) { | ||
| 370 | + lastTimestamp = [[[NSUserDefaults standardUserDefaults] objectForKey:kIMAMSG_PendencyTimestamp] unsignedIntValue]; | ||
| 371 | + } | ||
| 372 | + | ||
| 367 | if (pendencyResponse.pendencies > 0) { | 373 | if (pendencyResponse.pendencies > 0) { |
| 368 | for (TIMFriendPendencyItem *item in pendencyResponse.pendencies) { | 374 | for (TIMFriendPendencyItem *item in pendencyResponse.pendencies) { |
| 369 | - if (item.type == TIM_PENDENCY_COME_IN) { | 375 | + if ( |
| 376 | + (item.type == TIM_PENDENCY_COME_IN) | ||
| 377 | + && | ||
| 378 | + (item.addTime > lastTimestamp) | ||
| 379 | + ) { | ||
| 370 | isHasUnread = YES; | 380 | isHasUnread = YES; |
| 371 | break; | 381 | break; |
| 372 | } | 382 | } |
CNLiveNewIMAManagerKit/Classes/PublicHeader/IMANotification.h
| @@ -126,6 +126,9 @@ static NSString *const kIMAMSG_ShowNewFriendDotview = @"kIMAMSG_ShowNewFriendDot | @@ -126,6 +126,9 @@ static NSString *const kIMAMSG_ShowNewFriendDotview = @"kIMAMSG_ShowNewFriendDot | ||
| 126 | 126 | ||
| 127 | #pragma mark 新朋友未决列表序列号 | 127 | #pragma mark 新朋友未决列表序列号 |
| 128 | static NSString *const kIMAMSG_PendencySeq = @"kIMAMSG_PendencySeq"; | 128 | static NSString *const kIMAMSG_PendencySeq = @"kIMAMSG_PendencySeq"; |
| 129 | +//新朋友列表上次浏览时间戳 | ||
| 130 | +static NSString *const kIMAMSG_PendencyTimestamp = @"kIMAMSG_PendencyTimestamp"; | ||
| 131 | + | ||
| 129 | #pragma mark 智能音响绑定相关 | 132 | #pragma mark 智能音响绑定相关 |
| 130 | 133 | ||
| 131 | static NSString *const kIMAMSG_Bind = @"kIMAMSG_Bind"; //绑定 | 134 | static NSString *const kIMAMSG_Bind = @"kIMAMSG_Bind"; //绑定 |
| @@ -159,4 +162,7 @@ static NSString *const kIMAMSG_ReceivingGiftsNotification = @"kIMAMSG_ReceivingG | @@ -159,4 +162,7 @@ static NSString *const kIMAMSG_ReceivingGiftsNotification = @"kIMAMSG_ReceivingG | ||
| 159 | #pragma mark 照片修复成功 | 162 | #pragma mark 照片修复成功 |
| 160 | static NSString *const kIMAMSG_PhotoFixSuccessNotification = @"kIMAMSG_PhotoFixSuccessNotification"; | 163 | static NSString *const kIMAMSG_PhotoFixSuccessNotification = @"kIMAMSG_PhotoFixSuccessNotification"; |
| 161 | 164 | ||
| 165 | +#pragma mark 收到商家版申请退款消息通知 | ||
| 166 | +static NSString *const kIMAMSG_ApplyForRefundNotification = @"kIMAMSG_ApplyForRefundNotification"; | ||
| 167 | + | ||
| 162 | #endif /* IMANotification_h */ | 168 | #endif /* IMANotification_h */ |