Commit 511070eae7d4383332490614c19d23d6ae452ce2

Authored by daojian
1 parent 1b665afc

0.2.7 版本 1.发送商家版申请退款消息

2.解决首页偶发通讯录亮红点
CNLiveNewIMAManagerKit.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveNewIMAManagerKit'
11   - s.version = '0.2.6'
  11 + s.version = '0.2.7'
12 12 s.summary = 'A short description of CNLiveNewIMAManagerKit.'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveNewIMAManagerKit/Classes/Playform/IMAConversationManager.m
... ... @@ -1068,6 +1068,10 @@
1068 1068 NSDictionary *topicData = dic[@"topicData"];
1069 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 1075 return isBreak;
1072 1076 }
1073 1077  
... ...
CNLiveNewIMAManagerKit/Classes/Playform/IMAPlatform+FriendShip.m
... ... @@ -350,7 +350,7 @@
350 350  
351 351 TIMFriendPendencyRequest *request = [[TIMFriendPendencyRequest alloc] init];
352 352 NSTimeInterval interval = [[NSDate date] timeIntervalSince1970];
353   - double timestamp = interval;
  353 + NSUInteger timestamp = interval;
354 354 request.timestamp = timestamp;
355 355  
356 356 int sep = 0;
... ... @@ -363,10 +363,20 @@
363 363  
364 364 /**标记是否有未读的好友邀请*/
365 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 373 if (pendencyResponse.pendencies > 0) {
368 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 380 isHasUnread = YES;
371 381 break;
372 382 }
... ...
CNLiveNewIMAManagerKit/Classes/PublicHeader/IMANotification.h
... ... @@ -126,6 +126,9 @@ static NSString *const kIMAMSG_ShowNewFriendDotview = @"kIMAMSG_ShowNewFriendDot
126 126  
127 127 #pragma mark 新朋友未决列表序列号
128 128 static NSString *const kIMAMSG_PendencySeq = @"kIMAMSG_PendencySeq";
  129 +//新朋友列表上次浏览时间戳
  130 +static NSString *const kIMAMSG_PendencyTimestamp = @"kIMAMSG_PendencyTimestamp";
  131 +
129 132 #pragma mark 智能音响绑定相关
130 133  
131 134 static NSString *const kIMAMSG_Bind = @"kIMAMSG_Bind"; //绑定
... ... @@ -159,4 +162,7 @@ static NSString *const kIMAMSG_ReceivingGiftsNotification = @"kIMAMSG_ReceivingG
159 162 #pragma mark 照片修复成功
160 163 static NSString *const kIMAMSG_PhotoFixSuccessNotification = @"kIMAMSG_PhotoFixSuccessNotification";
161 164  
  165 +#pragma mark 收到商家版申请退款消息通知
  166 +static NSString *const kIMAMSG_ApplyForRefundNotification = @"kIMAMSG_ApplyForRefundNotification";
  167 +
162 168 #endif /* IMANotification_h */
... ...