修复塔罗房间公屏不显示问题
This commit is contained in:
@@ -161,7 +161,10 @@ UIKIT_EXTERN NSString * adImageName;
|
||||
if (!shouldJump || info == nil) {
|
||||
return;
|
||||
}
|
||||
[self performSelectorOnMainThread:@selector(advertiseJumpHandleWithInfo:) withObject:info waitUntilDone:NO];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self performSelectorOnMainThread:@selector(advertiseJumpHandleWithInfo:) withObject:info waitUntilDone:NO];
|
||||
});
|
||||
|
||||
};
|
||||
[advertiseView show];
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
int second = [dict[@"second"] intValue];
|
||||
NSDictionary *data = dict[@"data"];
|
||||
if ([data isKindOfClass:[NSString class]]) {
|
||||
data = [(NSString *)data model2dictionary];
|
||||
data = [self dictionaryWithJsonString:(NSString *)data];
|
||||
}
|
||||
if ([data isKindOfClass:[NSDictionary class]]) {
|
||||
AttachmentModel *attachment = [[AttachmentModel alloc]init];
|
||||
@@ -35,5 +35,35 @@
|
||||
}
|
||||
return attachment;
|
||||
}
|
||||
//json格式字符串转字典:
|
||||
- (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString {
|
||||
|
||||
if (jsonString == nil) {
|
||||
|
||||
return nil;
|
||||
|
||||
}
|
||||
|
||||
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
NSError *err;
|
||||
|
||||
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData
|
||||
|
||||
options:NSJSONReadingMutableContainers
|
||||
|
||||
error:&err];
|
||||
|
||||
if(err) {
|
||||
|
||||
NSLog(@"json解析失败:%@",err);
|
||||
|
||||
return nil;
|
||||
|
||||
}
|
||||
|
||||
return dic;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -846,9 +846,12 @@
|
||||
NSString *text = [NSString stringWithFormat:@" %@", attachment.data[@"drawMsgText"]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:text color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
if ([attachment.data[@"drawGoldNum"] intValue] > 1) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%d",[attachment.data[@"drawGoldNum"] intValue]] color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%d",[attachment.data[@"drawGoldNum"] intValue]] color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%@ ", attachment.data[@"chargeProdName"]] color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPNobleCenterPayView1") color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
|
||||
}
|
||||
messageInfo.content = attribute;
|
||||
return messageInfo;
|
||||
|
@@ -477,6 +477,10 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
@(CustomMessageType_Gift_Compound):
|
||||
[NSSet setWithObjects:@(Custom_Message_Sub_Gift_Compound),
|
||||
nil],
|
||||
@(CustomMessageType_Tarot):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Tarot),
|
||||
nil],
|
||||
@(CustomMessageType_Room_Sailing):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Sailing_Me),
|
||||
|
Reference in New Issue
Block a user