Commit 53f5ca49e4581870e78662c6b0254cc4461c88fe
1 parent
fc2b2ef7
0.7.3 版本 家园共享消息商品名现在8个字
获取群消息免打扰状态
Showing
4 changed files
with
29 additions
and
2 deletions
CNLiveNewIMAManagerKit.podspec
CNLiveNewIMAManagerKit/Classes/TIMCategory/TIMElem+ShowAPIs.m
| ... | ... | @@ -1234,7 +1234,13 @@ |
| 1234 | 1234 | { |
| 1235 | 1235 | NSDictionary *shareGoodsDic = packMsg.customMsgData[@"shareGoodsData"]; |
| 1236 | 1236 | |
| 1237 | - NSString *contentStr = [NSString stringWithFormat:@"“%@”将“%@”共享至“%@”中,点击查看",shareGoodsDic[@"userName"], shareGoodsDic[@"goodsName"], shareGoodsDic[@"showName"]]; | |
| 1237 | + NSString *goodsName = shareGoodsDic[@"goodsName"]; | |
| 1238 | + if (goodsName && goodsName.length > 8) { | |
| 1239 | + //现在长度为8 | |
| 1240 | + goodsName = [NSString stringWithFormat:@"%@...",[goodsName substringToIndex:8]]; | |
| 1241 | + | |
| 1242 | + } | |
| 1243 | + NSString *contentStr = [NSString stringWithFormat:@"“%@”将“%@”共享至“%@”中,点击查看",shareGoodsDic[@"userName"], goodsName, shareGoodsDic[@"showName"]]; | |
| 1238 | 1244 | |
| 1239 | 1245 | NSMutableAttributedString *contentAtt = [[NSMutableAttributedString alloc] initWithString:contentStr]; |
| 1240 | 1246 | ... | ... |
CNLiveNewIMAManagerKit/Classes/TIMModel/Group/IMAGroup.h
| ... | ... | @@ -96,4 +96,8 @@ typedef void (^callBack)(int code, NSString *msg); |
| 96 | 96 | /// 获取申请入群设置 |
| 97 | 97 | - (NSString *)groupAddOpt; |
| 98 | 98 | |
| 99 | + | |
| 100 | +/// 是否显示消息未读数 | |
| 101 | +/// @param block showUnreadMessageNum 为YES,显示 | |
| 102 | +- (void)getReceiveMessage:(void(^)(BOOL showUnreadMessageNum))block; | |
| 99 | 103 | @end | ... | ... |
CNLiveNewIMAManagerKit/Classes/TIMModel/Group/IMAGroup.m
| ... | ... | @@ -262,6 +262,23 @@ |
| 262 | 262 | return [_groupInfo.groupType isEqualToString:kPrivateGroupType]; |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | +/// 是否显示消息未读数 | |
| 266 | +/// @param block showUnreadMessageNum 为YES,显示 | |
| 267 | +- (void)getReceiveMessage:(void(^)(BOOL showUnreadMessageNum))block | |
| 268 | +{ | |
| 269 | + [[TIMGroupManager sharedInstance] getReciveMessageOpt:self.groupId succ:^(TIMGroupReceiveMessageOpt opt) { | |
| 270 | + if (opt == TIM_GROUP_RECEIVE_MESSAGE) { | |
| 271 | + if (block) { | |
| 272 | + block(YES); | |
| 273 | + } | |
| 274 | + } | |
| 275 | + else | |
| 276 | + if (block)block(NO); | |
| 277 | + | |
| 278 | + } fail:^(int code, NSString *msg) { | |
| 279 | + if (block)block(YES); | |
| 280 | + }]; | |
| 281 | +} | |
| 265 | 282 | #pragma - mark overwrite IMAUser方法 |
| 266 | 283 | |
| 267 | 284 | - (NSString *)groupId | ... | ... |