1.0.30 封版
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "gift_tag_latest_ar.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "gift_tag_latest_en.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
@@ -58,7 +58,7 @@
|
||||
ticket:ticket
|
||||
uid:uid
|
||||
page:@(page).stringValue
|
||||
pageSize:@"2"];
|
||||
pageSize:@"20"];
|
||||
}
|
||||
|
||||
- (void)loadRoomCard:(NSInteger)page
|
||||
|
@@ -512,7 +512,7 @@ static NSArray<NSDictionary<NSString *, NSNumber *> *> *MyDressUpOptions(void) {
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_avatarView = [[NetImageView alloc] initWithConfig:config];
|
||||
[_avatarView setCornerRadius:73/2
|
||||
[_avatarView setCornerRadius:kGetScaleWidth(73)/2
|
||||
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
|
||||
borderWidth:2
|
||||
borderColor:UIColorFromRGB(0xFBD99A)];
|
||||
|
@@ -250,7 +250,6 @@
|
||||
[self.contentView layoutIfNeeded];
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -258,7 +257,8 @@
|
||||
self.titleLabel.text = model.name;
|
||||
|
||||
if (model.dressType == 3) {
|
||||
[self play:model.effect];
|
||||
NSString *url = [NSString isEmpty:model.effect] ? model.pic : model.effect;
|
||||
[self play:url];
|
||||
self.playButton.hidden = YES;
|
||||
self.itemImageView.hidden = YES;
|
||||
} else {
|
||||
@@ -306,7 +306,6 @@
|
||||
}
|
||||
|
||||
#pragma mark - HWDMP4PlayDelegate
|
||||
//即将开始播放时询问,true马上开始播放,false放弃播放
|
||||
- (BOOL)shouldStartPlayMP4:(VAPView *)container config:(QGVAPConfigModel *)config {
|
||||
return YES;
|
||||
}
|
||||
@@ -790,7 +789,7 @@
|
||||
@property (nonatomic, strong) NSMutableSet<NSNumber *> *requestedPages; // 记录已经请求的数据页, 通过下标判断
|
||||
@property (nonatomic, strong) NSIndexPath *selectedIndexPath;
|
||||
@property(nonatomic, strong) NSMutableArray<NSNumber *> *myDressingDataPagesNumbers; //缓存我的装扮页每页的当前 API 分页
|
||||
|
||||
@property(nonatomic, strong) NSMutableArray<NSNumber *> *myDressingUsingItemPages; //缓存当前分页类目是有使用任何道具
|
||||
@property(nonatomic, assign) NSInteger currengCategoryIndex;
|
||||
@end
|
||||
|
||||
@@ -817,6 +816,7 @@
|
||||
self.dataCache = @{}.mutableCopy;
|
||||
self.myDressingDataCache = @{}.mutableCopy;
|
||||
self.myDressingDataPagesNumbers = @[].mutableCopy;
|
||||
self.myDressingUsingItemPages = @[@(NO), @(NO), @(NO), @(NO), @(NO)].mutableCopy;
|
||||
self.requestedPages = [NSMutableSet set]; // 初始化请求记录
|
||||
self.mallItemsScrollView.delegate = self; // 设置代理
|
||||
|
||||
@@ -981,7 +981,6 @@
|
||||
- (void)updateItemCollectionViewWithMyDressingData:(NSArray <MyDressingDataModel *>*)data
|
||||
pageNum:(NSInteger)pageNum
|
||||
atIndex:(NSInteger)index {
|
||||
|
||||
NSMutableArray <MyDressingDataModel *>*sortedData = data.mutableCopy;
|
||||
[sortedData sortUsingComparator:^NSComparisonResult(MyDressingDataModel * _Nonnull obj1, MyDressingDataModel * _Nonnull obj2) {
|
||||
if (obj1.used) {
|
||||
@@ -999,6 +998,15 @@
|
||||
NSMutableArray *array = self.myDressingDataCache[@(index)].mutableCopy;
|
||||
[array addObjectsFromArray:sortedData];
|
||||
self.myDressingDataCache[@(index)] = array.copy;
|
||||
sortedData = array;
|
||||
}
|
||||
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"used == 1"];
|
||||
BOOL containsYes = [sortedData filteredArrayUsingPredicate:predicate].count > 0;
|
||||
if (containsYes) {
|
||||
self.myDressingUsingItemPages[index] = @(YES);
|
||||
} else {
|
||||
self.myDressingUsingItemPages[index] = @(NO);
|
||||
}
|
||||
|
||||
if (index < self.itemCollectionViewArray.count) {
|
||||
@@ -1031,11 +1039,8 @@
|
||||
- (void)refreshCurrentPageData {
|
||||
UICollectionView *itemView = [self.itemCollectionViewArray xpSafeObjectAtIndex:self.currengCategoryIndex];
|
||||
if (itemView) {
|
||||
// [itemView setContentOffset:CGPointZero animated:YES];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self handlePullToRefresh:itemView.refreshControl];
|
||||
});
|
||||
}
|
||||
[self handlePullToRefresh:itemView.refreshControl];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1083,6 +1088,10 @@
|
||||
cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"MyDressingItemCard_NotUsed"
|
||||
forIndexPath:indexPath];
|
||||
cell.model = nil;
|
||||
NSNumber *isUsed = [self.myDressingUsingItemPages xpSafeObjectAtIndex:collectionView.tag];
|
||||
if (isUsed) {
|
||||
cell.selected = !isUsed.boolValue;
|
||||
}
|
||||
} else {
|
||||
cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"MyDressingItemCard"
|
||||
forIndexPath:indexPath];
|
||||
@@ -1174,7 +1183,7 @@
|
||||
}
|
||||
|
||||
- (void)addLoadMoreForCollectionView:(UICollectionView *)collectionView {
|
||||
if (collectionView.tag == 0) {
|
||||
if (collectionView.tag == 0 || collectionView.tag == 1) {
|
||||
return;
|
||||
}
|
||||
@kWeakify(self);
|
||||
|
@@ -134,6 +134,36 @@
|
||||
|
||||
self.itemImageView.imageUrl = myDressingModel.pic;
|
||||
self.nameLabel.text = myDressingModel.name;
|
||||
|
||||
if (myDressingModel.dressType == 3) {
|
||||
switch (myDressingModel.effectType) {
|
||||
case 1:{
|
||||
[self addSubview:self.mp4View];
|
||||
[self.mp4View mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.itemImageView);
|
||||
}];
|
||||
self.mp4Parser = [[XPRoomGiftAnimationParser alloc] init];
|
||||
|
||||
NSString *url = [NSString isEmpty:myDressingModel.effect] ? myDressingModel.pic : myDressingModel.effect;
|
||||
|
||||
@kWeakify(self);
|
||||
[self.mp4Parser parseWithURL:url
|
||||
completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
@kStrongify(self);
|
||||
if (![NSString isEmpty:videoUrl]) {
|
||||
[self.mp4View playHWDMP4:videoUrl repeatCount:-1 delegate:nil];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) { }];
|
||||
}
|
||||
self.itemImageView.hidden = YES;
|
||||
break;
|
||||
case 0:
|
||||
case 2:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (self.isVaild) {
|
||||
self.buyButton.hidden = NO;
|
||||
self.pricePerDayLabel.attributedText = [myDressingModel generateAttributedStringWithIncludeOriginalPrice:YES];
|
||||
@@ -176,7 +206,7 @@
|
||||
|
||||
[self addSubview:self.nameLabel];
|
||||
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.leading.trailing.mas_equalTo(self).inset(6);
|
||||
make.top.mas_equalTo(self.itemImageBGView.mas_bottom).offset(4);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
|
@@ -132,6 +132,9 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
|
||||
#pragma mark - UITableViewDelegate
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (self.recentSessions.count == 0) {
|
||||
return;
|
||||
}
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.openType == SessionListOpenTypeRoom) {
|
||||
NIMRecentSession *recentSession = self.recentSessions[indexPath.row];
|
||||
|
@@ -110,6 +110,7 @@ HWDMP4PlayDelegate>
|
||||
///头饰播放
|
||||
@property (nonatomic, strong) SpriteSheetImageManager *manager;
|
||||
@property (nonatomic, strong) SVGAImageView *headWearSvgaImageView;
|
||||
@property (nonatomic, strong) SVGAImageView *headWearSvgaImageView_cp_me;
|
||||
@property (nonatomic, strong) SVGAImageView *headWearSvgaImageView_cp;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *cpAvatarHeart;
|
||||
@@ -335,6 +336,12 @@ HWDMP4PlayDelegate>
|
||||
make.leading.mas_equalTo(self.headWearSvgaImageView.mas_trailing).offset(kGetScaleWidth(16));
|
||||
make.centerY.equalTo(self.userInfoView.mas_top);
|
||||
}];
|
||||
|
||||
[self addSubview:self.headWearSvgaImageView_cp_me];
|
||||
[self.headWearSvgaImageView_cp_me mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.mas_equalTo(self.avatarView);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(114));
|
||||
}];
|
||||
|
||||
[self addSubview:self.headWearSvgaImageView_cp];
|
||||
[self.headWearSvgaImageView_cp mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -908,6 +915,8 @@ HWDMP4PlayDelegate>
|
||||
if (level == 0) {
|
||||
return;
|
||||
}
|
||||
self.headWearSvgaImageView.videoItem = nil;
|
||||
[self.headWearSvgaImageView stopAnimation];
|
||||
|
||||
@kWeakify(self);
|
||||
SVGAParser *parser = [SVGAParser new];
|
||||
@@ -915,10 +924,10 @@ HWDMP4PlayDelegate>
|
||||
inBundle:[NSBundle mainBundle]
|
||||
completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
self.headWearSvgaImageView.hidden = NO;
|
||||
self.headWearSvgaImageView_cp_me.hidden = NO;
|
||||
self.headWearSvgaImageView_cp.hidden = NO;
|
||||
self.headWearSvgaImageView.videoItem = videoItem;
|
||||
[self.headWearSvgaImageView startAnimation];
|
||||
self.headWearSvgaImageView_cp_me.videoItem = videoItem;
|
||||
[self.headWearSvgaImageView_cp_me startAnimation];
|
||||
self.headWearSvgaImageView_cp.videoItem = videoItem;
|
||||
[self.headWearSvgaImageView_cp startAnimation];
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
@@ -1336,6 +1345,18 @@ HWDMP4PlayDelegate>
|
||||
return _headWearSvgaImageView;
|
||||
}
|
||||
|
||||
- (SVGAImageView *)headWearSvgaImageView_cp_me {
|
||||
if (!_headWearSvgaImageView_cp_me) {
|
||||
_headWearSvgaImageView_cp_me = [[SVGAImageView alloc]init];
|
||||
_headWearSvgaImageView_cp_me.hidden = YES;
|
||||
_headWearSvgaImageView_cp_me.backgroundColor = [UIColor clearColor];
|
||||
_headWearSvgaImageView_cp_me.frame = self.bounds;
|
||||
_headWearSvgaImageView_cp_me.userInteractionEnabled = YES;
|
||||
_headWearSvgaImageView_cp_me.autoPlay = YES;
|
||||
}
|
||||
return _headWearSvgaImageView_cp_me;
|
||||
}
|
||||
|
||||
- (SVGAImageView *)headWearSvgaImageView_cp {
|
||||
if (!_headWearSvgaImageView_cp) {
|
||||
_headWearSvgaImageView_cp = [[SVGAImageView alloc]init];
|
||||
@@ -1393,13 +1414,7 @@ HWDMP4PlayDelegate>
|
||||
if (!_personalBGMP4) {
|
||||
_personalBGMP4 = [[VAPView alloc] initWithFrame:CGRectMake(0, kGetScaleWidth(-82/2), KScreenWidth, kGetScaleWidth(370))];
|
||||
_personalBGMP4.contentMode = UIViewContentModeScaleAspectFill;
|
||||
// _vapView.
|
||||
_personalBGMP4.hwd_Delegate = self;
|
||||
// @kWeakify(self);
|
||||
// [_vapView addVapTapGesture:^(UIGestureRecognizer *gestureRecognizer, BOOL insideSource, QGVAPSourceDisplayItem *source) {
|
||||
// @kStrongify(self);
|
||||
// [self removeCPAnimation];
|
||||
// }];
|
||||
}
|
||||
return _personalBGMP4;
|
||||
}
|
||||
|
@@ -21,6 +21,8 @@
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.contentView.backgroundColor = [UIColor clearColor];
|
||||
[self.contentView addSubview:self.selectedStatusImageView];
|
||||
[self.selectedStatusImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
@@ -106,7 +108,7 @@
|
||||
[self updateUI];
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
@kStrongify(self);
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -165,6 +167,12 @@
|
||||
make.height.mas_equalTo(140);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.placeholderLabel];
|
||||
[self.placeholderLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.reasonTextView).offset(10);
|
||||
make.leading.trailing.mas_equalTo(self.reasonTextView).inset(12);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.blockButton];
|
||||
[self.blockButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
@@ -198,7 +206,7 @@
|
||||
}
|
||||
|
||||
- (void)didTapBlock {
|
||||
if ([NSString isEmpty:self.reasonTextView.text]) {
|
||||
if (self.reasonTextView.text.length == 0) {
|
||||
|
||||
} else {
|
||||
@kWeakify(self);
|
||||
@@ -207,7 +215,7 @@
|
||||
resaon:self.reasonTextView.text
|
||||
success:^{
|
||||
@kStrongify(self);
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
} failure:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
@@ -226,8 +234,8 @@
|
||||
#pragma mark - UITextViewDelegate
|
||||
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
|
||||
NSString *newText = [textView.text stringByReplacingCharactersInRange:range withString:text];
|
||||
self.placeholderLabel.hidden = ![NSString isEmpty:newText];
|
||||
self.blockButton.alpha = [NSString isEmpty:newText] ? 0.5 : 1;
|
||||
self.placeholderLabel.hidden = newText.length != 0;
|
||||
self.blockButton.alpha = newText.length == 0 ? 0.5 : 1;
|
||||
return YES;
|
||||
}
|
||||
|
||||
@@ -304,6 +312,7 @@
|
||||
_blockedTimeCollectionView.allowsMultipleSelection = NO;
|
||||
_blockedTimeCollectionView.delegate = self;
|
||||
_blockedTimeCollectionView.dataSource = self;
|
||||
_blockedTimeCollectionView.backgroundColor = [UIColor whiteColor];
|
||||
[_blockedTimeCollectionView registerClass:[BlockHourCell class] forCellWithReuseIdentifier:@"BlockHourCell"];
|
||||
}
|
||||
return _blockedTimeCollectionView;
|
||||
@@ -315,13 +324,7 @@
|
||||
_reasonTextView.delegate = self;
|
||||
[_reasonTextView setCornerRadius:10];
|
||||
_reasonTextView.backgroundColor = UIColorFromRGB(0xf6f6f6);
|
||||
|
||||
[_reasonTextView addSubview:self.placeholderLabel];
|
||||
[self.placeholderLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(10);
|
||||
make.leading.mas_equalTo(12);
|
||||
make.trailing.mas_equalTo(-12);
|
||||
}];
|
||||
_reasonTextView.textColor = [UIColor darkGrayColor];
|
||||
}
|
||||
return _reasonTextView;
|
||||
}
|
||||
@@ -345,6 +348,7 @@
|
||||
_placeholderLabel = [UILabel labelInitWithText:YMLocalizedString(@"1.0.30_text_30")
|
||||
font:kFontRegular(14)
|
||||
textColor:UIColorFromRGB(0x7b7b7d)];
|
||||
_placeholderLabel.numberOfLines = 0;
|
||||
}
|
||||
return _placeholderLabel;
|
||||
}
|
||||
|
@@ -48,7 +48,6 @@
|
||||
self.membersCount = (kGetScaleWidth(345) - kGetScaleWidth(90))/kGetScaleWidth(20);
|
||||
|
||||
for (int i = 0; i < self.membersCount; i++) {
|
||||
// for (int i = 0; i < 20; i++) {
|
||||
NetImageConfig *config = [[NetImageConfig alloc]init];
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
NetImageView *iconView = [[NetImageView alloc]initWithConfig:config];
|
||||
@@ -126,8 +125,6 @@
|
||||
|
||||
[self.rankImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView).insets(UIEdgeInsetsMake(-20, -10, 0, -10));
|
||||
// make.center.mas_equalTo(self.contentView);
|
||||
// make.size.mas_equalTo(self.contentView).multipliedBy(1.1);
|
||||
}];
|
||||
|
||||
[self.tagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
@@ -99,8 +99,8 @@
|
||||
extModel.gender = userInfo.gender;
|
||||
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
|
||||
extModel.platformRole = userInfo.platformRole;
|
||||
|
||||
|
||||
extModel.nick = userInfo.nick;
|
||||
|
||||
NSMutableDictionary *ext = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld", userInfo.uid]];
|
||||
request.roomExt = [ext toJSONString];
|
||||
@kWeakify(self);
|
||||
|
@@ -186,9 +186,9 @@ PIUniversalBannerViewDelegate>
|
||||
@property (nonatomic, strong) AttachmentModel *cpAttachment;
|
||||
|
||||
@property(nonatomic, strong) GiftReceiveInfoModel *mp4TempReceiveInfoModel;
|
||||
@property(nonatomic, strong) NetImageView *mp4AvatarLoader_1;
|
||||
@property(nonatomic, strong) NetImageView *mp4AvatarLoader_2;
|
||||
@property(nonatomic, strong) NSMutableArray *embeddedTargetDatas;
|
||||
//@property(nonatomic, strong) NetImageView *mp4AvatarLoader_1;
|
||||
//@property(nonatomic, strong) NetImageView *mp4AvatarLoader_2;
|
||||
@property(nonatomic, strong) NSMutableArray *avatarLoaders;
|
||||
|
||||
@end
|
||||
|
||||
@@ -308,6 +308,20 @@ PIUniversalBannerViewDelegate>
|
||||
GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
|
||||
|
||||
if (attachment.second == Custom_Message_Sub_Gift_EmbeddedStyle) {
|
||||
if (receiveInfo.giftVo) {
|
||||
receiveInfo.gift = receiveInfo.giftVo;
|
||||
// receiveInfo.targetUid = receiveInfo.recvUserUid;
|
||||
// receiveInfo.targetNick = receiveInfo.recvUserNick;
|
||||
// receiveInfo.targetUids = @[receiveInfo.recvUserUid];
|
||||
// if (<#condition#>) {
|
||||
// <#statements#>
|
||||
// }
|
||||
// [data setObject:[[obj objectForKey:@"uid"] stringValue] forKey:@"targetUid"];
|
||||
// [data setObject:[obj objectForKey:@"nick"] forKey:@"targetNick"];
|
||||
// [data setObject:[obj objectForKey:@"avatar"] forKey:@"targetAvatar"];
|
||||
}
|
||||
|
||||
// TODO: 只送一个人时背包礼物有问题
|
||||
receiveInfo.targetUid = [[attachment.data objectForKey:@"recvUserUid"] stringValue];
|
||||
receiveInfo.targetNick = [attachment.data objectForKey:@"recvUserNick"];
|
||||
receiveInfo.targetAvatar = [attachment.data objectForKey:@"recvUserAvatar"];
|
||||
@@ -327,11 +341,7 @@ PIUniversalBannerViewDelegate>
|
||||
receiveInfo.targetUids = @[@(receiveInfo.uid.integerValue)];
|
||||
}
|
||||
}
|
||||
|
||||
if (!_embeddedTargetDatas) {
|
||||
_embeddedTargetDatas = @[].mutableCopy;
|
||||
}
|
||||
|
||||
|
||||
receiveInfo.isLuckyBagGift = attachment.second == Custom_Message_Sub_Gift_LuckySend;
|
||||
receiveInfo.isBatch = (attachment.second == Custom_Message_Sub_AllBatchSend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend);
|
||||
receiveInfo.isComboBatch = attachment.second == Custom_Message_Sub_AllMicroSend;
|
||||
@@ -350,16 +360,12 @@ PIUniversalBannerViewDelegate>
|
||||
}
|
||||
}
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
if (receiveInfo.gift.notifyFull) {
|
||||
return;
|
||||
}
|
||||
[self receiveGift:receiveInfo];
|
||||
});
|
||||
} else {
|
||||
if (receiveInfo.gift.notifyFull) {
|
||||
if (receiveInfo.gift.notifyFull && attachment.second == Custom_Message_Sub_Gift_Send) {
|
||||
return;
|
||||
}
|
||||
[self.embeddedTargetDatas insertObject:receiveInfo atIndex:0];
|
||||
[self receiveGift:receiveInfo];
|
||||
}
|
||||
} else if (attachment.first == CustomMessageType_AllMicroSend) { //发送全麦礼物 或者多人礼物
|
||||
@@ -385,15 +391,9 @@ PIUniversalBannerViewDelegate>
|
||||
}
|
||||
}
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
if (receiveInfo.gift.notifyFull) {
|
||||
return;
|
||||
}
|
||||
[self receiveGift:receiveInfo];
|
||||
});
|
||||
} else {
|
||||
if (receiveInfo.gift.notifyFull) {
|
||||
return;
|
||||
}
|
||||
[self receiveGift:receiveInfo];
|
||||
}
|
||||
} else if (attachment.first == CustomMessageType_LuckyBag ) {//福袋消息厅内展示
|
||||
@@ -1114,18 +1114,28 @@ PIUniversalBannerViewDelegate>
|
||||
|
||||
#pragma mark - 进房动画 XXX来了
|
||||
- (void)userEnterRoom:(NIMChatroomNotificationContent *)content ext:(XPMessageRemoteExtModel *)extModel {
|
||||
NSString *userName = content.source.nick;
|
||||
if ([NSString isEmpty:userName] && content.source.userId.intValue == self.delegate.getUserInfo.uid) {
|
||||
userName = self.delegate.getUserInfo.nick;
|
||||
} else if ([NSString isEmpty:userName]) {
|
||||
userName = extModel.nick;
|
||||
} else if ([NSString isEmpty:userName]) {
|
||||
userName = @"";
|
||||
}
|
||||
|
||||
if(extModel.enterRoomEffects.length > 0){
|
||||
NSString * title = [NSString stringWithFormat:YMLocalizedString(@"XPRoomAnimationView0"), content.source.nick];
|
||||
NSString * title = [NSString stringWithFormat:YMLocalizedString(@"XPRoomAnimationView0"), userName];
|
||||
if (self.enterEffectQueue.count ==0) {
|
||||
[self playUserEnterRoomAnimation:title experLevelSeq:extModel.experLevelSeq effectPath:extModel.enterRoomEffects];
|
||||
}
|
||||
NSDictionary * dic= @{@"title":title, @"experLevelSeq":[NSString stringWithFormat:@"%ld", extModel.experLevelSeq], @"effectPath" : extModel.enterRoomEffects.length ? extModel.enterRoomEffects : @""};
|
||||
[self.enterEffectQueue addObject:dic];
|
||||
return;
|
||||
} else if (extModel.experLevelSeq < 30) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (extModel.experLevelSeq < 30) return;
|
||||
NSString * title = [NSString stringWithFormat:YMLocalizedString(@"XPRoomAnimationView0"), content.source.nick];
|
||||
|
||||
NSString * title = [NSString stringWithFormat:YMLocalizedString(@"XPRoomAnimationView0"), userName];
|
||||
if (self.enterEffectQueue.count ==0) {
|
||||
[self playUserEnterRoomAnimation:title experLevelSeq:extModel.experLevelSeq effectPath:extModel.enterRoomEffects];
|
||||
}
|
||||
@@ -1141,14 +1151,17 @@ PIUniversalBannerViewDelegate>
|
||||
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:26], NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
[attribute setYy_alignment:NSTextAlignmentLeft];
|
||||
|
||||
BOOL needRemoveHandly = NO;
|
||||
|
||||
if (effectPath.length > 0) {
|
||||
needRemoveHandly = YES;
|
||||
@kWeakify(self);
|
||||
[self.parser parseWithURL:[NSURL URLWithString:effectPath] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
self.enterEffectView.loops = 2;
|
||||
self.enterEffectView.loops = 0;
|
||||
self.enterEffectView.hidden = NO;
|
||||
self.enterEffectView.clearsAfterStop = NO;
|
||||
self.enterEffectView.clearsAfterStop = YES;
|
||||
self.enterEffectView.alpha = 1;
|
||||
self.enterEffectView.videoItem = videoItem;
|
||||
[self.enterEffectView setAttributedText:attribute forKey:@"room_text"];
|
||||
@@ -1191,9 +1204,21 @@ PIUniversalBannerViewDelegate>
|
||||
NSLog(@"%@", error);
|
||||
}];
|
||||
}
|
||||
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
self.enterEffectView.frame = CGRectMake(0, 339 + kSafeAreaTopHeight, KScreenWidth, effectPath.length ? 75 : 40);
|
||||
} completion:^(BOOL finished) {
|
||||
if (needRemoveHandly) {
|
||||
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
// [self.enterEffectView stopAnimation];
|
||||
// });
|
||||
[UIView animateWithDuration:0.5 delay:1 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
self.enterEffectView.frame = CGRectMake(-KScreenWidth, 339 + kSafeAreaTopHeight, KScreenWidth, effectPath.length ? 75 : 40);
|
||||
} completion:^(BOOL finished) {
|
||||
[self.enterEffectView stopAnimation];
|
||||
[self svgaPlayerDidFinishedAnimation:self.enterEffectView];
|
||||
}];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -2287,7 +2312,7 @@ PIUniversalBannerViewDelegate>
|
||||
@kWeakify(self);
|
||||
dispatch_source_set_event_handler(_timer, ^{
|
||||
@kStrongify(self)
|
||||
NSLog(@"******************* 当前队列个数: %@", @(self.svgaQueue.count));
|
||||
NSLog(@"******************* 当前队列个数: %@,image loader 个数: %@", @(self.svgaQueue.count), @(self.avatarLoaders.count));
|
||||
if (self.svgaQueue.count > 0) {
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
if(self.isLargeGiftAnimating == NO){
|
||||
@@ -2474,6 +2499,9 @@ PIUniversalBannerViewDelegate>
|
||||
NSString *encodingUrl = [vapUrl pureURLString];
|
||||
NSString *fileName = [[encodingUrl componentsSeparatedByString:@"/"] lastObject];
|
||||
NSString *fullPath = [self.GiftDynamicEffectListPath stringByAppendingPathComponent:fileName];
|
||||
|
||||
self.avatarLoaders = @[].mutableCopy;
|
||||
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){
|
||||
vapUrl = fullPath;
|
||||
|
||||
@@ -2833,6 +2861,9 @@ PIUniversalBannerViewDelegate>
|
||||
if (self.mp4TempReceiveInfoModel) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
QGVAPSourceInfo *info = (QGVAPSourceInfo *)context[@"resource"];
|
||||
|
||||
NSLog(@" MP4 的 key - info.contentTag : %@", info.contentTag);
|
||||
|
||||
if ([info.contentTag isEqualToString:@"avatar1"]) {
|
||||
if ([NSString isEmpty:self.mp4TempReceiveInfoModel.avatar]) {
|
||||
completionBlock(kImage(@"common_avatar"), nil, @"dafeult image");
|
||||
@@ -2851,24 +2882,29 @@ PIUniversalBannerViewDelegate>
|
||||
return;
|
||||
break;
|
||||
}
|
||||
self.mp4AvatarLoader_1 = [[NetImageView alloc] init];
|
||||
[self.mp4AvatarLoader_1 loadImageWithUrl:path completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
|
||||
NetImageView *avatar_1_Loader = [[NetImageView alloc] init];
|
||||
[avatar_1_Loader loadImageWithUrl:path completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
completionBlock(image, nil, urlStr);
|
||||
}];
|
||||
|
||||
[self.avatarLoaders addObject:avatar_1_Loader];
|
||||
}
|
||||
}
|
||||
else if ([info.contentTag isEqualToString:@"avatar2"] ) {
|
||||
GiftReceiveInfoModel *infoModel = self.mp4TempReceiveInfoModel;// [self.embeddedTargetDatas lastObject];
|
||||
if (!infoModel || [NSString isEmpty:infoModel.targetAvatar]) {
|
||||
if (!infoModel || [NSString isEmpty:infoModel.targetAvatar]) {
|
||||
completionBlock(kImage(@"common_avatar"), nil, @"dafeult image");
|
||||
} else {
|
||||
self.mp4AvatarLoader_2 = [[NetImageView alloc] init];
|
||||
[self.mp4AvatarLoader_2 loadImageWithUrl:infoModel.targetAvatar completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
|
||||
NetImageView *avatar_2_Loader = [[NetImageView alloc] init];
|
||||
[avatar_2_Loader loadImageWithUrl:infoModel.targetAvatar completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
completionBlock(image, nil, urlStr);
|
||||
}];
|
||||
[self.avatarLoaders addObject:avatar_2_Loader];
|
||||
}
|
||||
} else {
|
||||
completionBlock(nil, nil, @"completionBlock");
|
||||
completionBlock(kImage(@"common_avatar"), nil, @"completionBlock");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2877,11 +2913,11 @@ PIUniversalBannerViewDelegate>
|
||||
- (NSString *)contentForVapTag:(NSString *)tag resource:(QGVAPSourceInfo *)info {
|
||||
NSString *name1 = @"";
|
||||
switch (self.mp4TempReceiveInfoModel.gift.showAvatarType) {
|
||||
case 1: // 只使用 avatar
|
||||
case 1:
|
||||
case 3:
|
||||
name1 = self.mp4TempReceiveInfoModel.nick;
|
||||
break;
|
||||
case 2: // 只使用 target avatar
|
||||
case 2:
|
||||
name1 = self.mp4TempReceiveInfoModel.targetNick;
|
||||
break;
|
||||
default:
|
||||
|
@@ -200,6 +200,8 @@
|
||||
giftName = _broadcastModel.i18nGiftNameMap.en;
|
||||
} else if (isMSZH() && _broadcastModel.i18nGiftNameMap.zh.length > 0) {
|
||||
giftName = _broadcastModel.i18nGiftNameMap.zh;
|
||||
} else if (isMSTR() && _broadcastModel.i18nGiftNameMap.tr.length > 0) {
|
||||
giftName = _broadcastModel.i18nGiftNameMap.tr;
|
||||
}
|
||||
|
||||
NSString *message = [NSString stringWithFormat:@"%@ %@ %@ %@",sendUserNick,YMLocalizedString(@"XPRoomYearActivityView0"),recvUserNick,giftName];
|
||||
|
@@ -1140,7 +1140,7 @@
|
||||
model.micQueue = self.delegate.getMicroQueue;
|
||||
model.superMangerList = self.delegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.delegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
|
||||
[self.delegate.getCurrentNav presentViewController:userCardVC animated:NO completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - XPAnchorPkPanelViewDelegate
|
||||
|
@@ -52,7 +52,7 @@ static const NSInteger kItemsPerRow = 5;
|
||||
[self.blurEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.equalTo(self).inset(0);
|
||||
make.bottom.equalTo(self).offset(12);
|
||||
make.height.mas_equalTo(kGetScaleWidth(246));
|
||||
make.height.mas_equalTo(self.collectionView.mas_height).multipliedBy(1.1);
|
||||
}];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.leading.trailing.equalTo(self).inset(kGetScaleWidth(0));
|
||||
@@ -93,9 +93,9 @@ static const NSInteger kItemsPerRow = 5;
|
||||
CGFloat calHeight = self.itemHeight;
|
||||
CGFloat height = 20 + 56 * lineNum + 44 * (lineNum - 1) + 70;
|
||||
height = calHeight * lineNum;
|
||||
[self.ms_bgView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kGetScaleWidth(height + 12));
|
||||
}];
|
||||
// [self.ms_bgView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.height.mas_equalTo(kGetScaleWidth(height + 12));
|
||||
// }];
|
||||
[self.collectionView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kGetScaleWidth(height));
|
||||
}];
|
||||
|
@@ -85,6 +85,7 @@
|
||||
extModel.androidBubbleUrl = userInfo.androidBubbleUrl;
|
||||
extModel.iosBubbleUrl = userInfo.iosBubbleUrl;
|
||||
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
|
||||
extModel.nick = userInfo.nick;
|
||||
|
||||
if([self.delegate getPublicScreenType]==1){
|
||||
extModel.avatar = userInfo.avatar;
|
||||
|
@@ -28,7 +28,7 @@
|
||||
///点击空白区域的手势
|
||||
@property (nonatomic,strong) UITapGestureRecognizer *tapEmptyRecognizer;
|
||||
|
||||
@property(nonatomic, strong) UIVisualEffectView *blurEffectView;
|
||||
//@property(nonatomic, strong) UIVisualEffectView *blurEffectView;
|
||||
@end
|
||||
|
||||
@implementation XPRoomMessageTableViewCell
|
||||
@@ -49,14 +49,12 @@
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self.contentView addSubview:self.bubbleImageView];
|
||||
[self.contentView addSubview:self.blurEffectView];
|
||||
// [self.contentView addSubview:self.blurEffectView];
|
||||
[self.contentView addSubview:self.contentLabel];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTap)];
|
||||
tap.delegate = self;
|
||||
self.tapEmptyRecognizer = tap;
|
||||
[self.contentView addGestureRecognizer:self.tapEmptyRecognizer];
|
||||
|
||||
|
||||
[self.contentView addGestureRecognizer:self.tapEmptyRecognizer];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -74,9 +72,9 @@
|
||||
make.width.mas_equalTo(kRoomMessageMaxWidth);
|
||||
}];
|
||||
|
||||
[self.blurEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.bubbleImageView);
|
||||
}];
|
||||
// [self.blurEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self.bubbleImageView);
|
||||
// }];
|
||||
}
|
||||
|
||||
- (void)setIsLeftBigImage:(BOOL)isLeftBigImage {
|
||||
@@ -102,10 +100,10 @@
|
||||
make.trailing.mas_equalTo(self.bubbleImageView).offset(-8);
|
||||
}];
|
||||
|
||||
[self.blurEffectView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.bubbleImageView);
|
||||
}];
|
||||
self.blurEffectView.hidden = NO;
|
||||
// [self.blurEffectView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self.bubbleImageView);
|
||||
// }];
|
||||
// self.blurEffectView.hidden = NO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +166,7 @@
|
||||
}
|
||||
|
||||
- (void)updateLayoutWithBubble {
|
||||
self.blurEffectView.hidden = !self.messageInfo.isHiddenBubble;
|
||||
// self.blurEffectView.hidden = !self.messageInfo.isHiddenBubble;
|
||||
@kWeakify(self);
|
||||
[self.bubbleImageView loadImageWithUrl:self.messageInfo.bubbleImageUrl
|
||||
completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
|
||||
@@ -195,7 +193,7 @@
|
||||
}
|
||||
|
||||
- (void)updateLayoutWithoutBubble {
|
||||
self.blurEffectView.hidden = NO;
|
||||
// self.blurEffectView.hidden = NO;
|
||||
self.bubbleImageView.image = [UIImage imageWithColor:[DJDKMIMOMColor messageBubbleColor]];
|
||||
[self.contentLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.messageInfo.contentTopMargin);
|
||||
@@ -278,18 +276,18 @@
|
||||
return _clickBtn;
|
||||
}
|
||||
|
||||
- (UIVisualEffectView *)blurEffectView {
|
||||
if (!_blurEffectView) {
|
||||
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
|
||||
_blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
|
||||
|
||||
// 设置模糊视图的大小与目标视图一致
|
||||
_blurEffectView.frame = CGRectMake(0, 0, KScreenWidth*2/3, 200);
|
||||
_blurEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
_blurEffectView.hidden = YES;
|
||||
|
||||
[_blurEffectView setCornerRadius:8];
|
||||
}
|
||||
return _blurEffectView;
|
||||
}
|
||||
//- (UIVisualEffectView *)blurEffectView {
|
||||
// if (!_blurEffectView) {
|
||||
// UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
|
||||
// _blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
|
||||
//
|
||||
// // 设置模糊视图的大小与目标视图一致
|
||||
// _blurEffectView.frame = CGRectMake(0, 0, KScreenWidth*2/3, 200);
|
||||
// _blurEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
// _blurEffectView.hidden = YES;
|
||||
//
|
||||
// [_blurEffectView setCornerRadius:8];
|
||||
// }
|
||||
// return _blurEffectView;
|
||||
//}
|
||||
@end
|
||||
|
@@ -630,7 +630,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
[self.messageTableView reloadData];
|
||||
|
||||
//执行插入动画并滚动
|
||||
[self scrollToBottom:YES];
|
||||
[self scrollToBottom:NO];
|
||||
}
|
||||
|
||||
///执行插入动画并滚动
|
||||
|
@@ -124,6 +124,7 @@
|
||||
extModel.androidBubbleUrl = userInfo.androidBubbleUrl;
|
||||
extModel.iosBubbleUrl = userInfo.iosBubbleUrl;
|
||||
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
|
||||
extModel.nick = userInfo.nick;
|
||||
|
||||
NIMMessage * message = [[NIMMessage alloc] init];
|
||||
message.text = text;
|
||||
|
@@ -111,6 +111,7 @@
|
||||
extModel.gender = userInfo.gender;
|
||||
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
|
||||
extModel.platformRole = userInfo.platformRole;
|
||||
extModel.nick = userInfo.nick;
|
||||
|
||||
NSMutableDictionary *ext = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld", userInfo.uid]];
|
||||
request.roomExt = [ext toJSONString];
|
||||
|
@@ -71,7 +71,7 @@
|
||||
extModel.androidBubbleUrl = userInfo.androidBubbleUrl;
|
||||
extModel.iosBubbleUrl = userInfo.iosBubbleUrl;
|
||||
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
|
||||
|
||||
extModel.nick = userInfo.nick;
|
||||
|
||||
NIMMessage * message = [[NIMMessage alloc] init];
|
||||
message.text = self.inputMessage;
|
||||
|
@@ -451,8 +451,10 @@
|
||||
@"isFromWinning":@(NO)}];
|
||||
} else {
|
||||
self.errorMessage = msg;
|
||||
self.actionCallback(ComboAction_RemovePanel);
|
||||
self.actionCallback(ComboAction_Error);
|
||||
if (self.actionCallback) {
|
||||
self.actionCallback(ComboAction_Error);
|
||||
}
|
||||
[self forceRemove];
|
||||
}
|
||||
}
|
||||
targetUids:allUIDs
|
||||
@@ -475,9 +477,15 @@
|
||||
NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:response.data];
|
||||
[dic setObject:@(self.combo) forKey:@"comboCount"];
|
||||
|
||||
self.sendGiftReceiveInfo = receive;
|
||||
|
||||
if (self.handleComboSuccess) {
|
||||
self.handleComboSuccess(receive, dic);
|
||||
}
|
||||
|
||||
if (self.actionCallback) {
|
||||
self.actionCallback(ComboAction_Update_After_Send_Success);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sendCustomMessage:(AttachmentModel *)attachment {
|
||||
|
@@ -58,6 +58,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong) NSArray<NSNumber *> *targetUids;
|
||||
///礼物信息 - 来自礼物 API
|
||||
@property (nonatomic,strong) GiftInfoModel *gift;
|
||||
///礼物信息 - 来自推送 35
|
||||
@property (nonatomic,strong) GiftInfoModel *giftVo;
|
||||
///礼物信息
|
||||
@property (nonatomic,strong) GiftInfoModel *giftInfo;
|
||||
///送礼物的人uid
|
||||
@@ -114,10 +116,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,copy) NSString *recvUserAvatar;
|
||||
///接收者的昵称
|
||||
@property (nonatomic,copy) NSString *recvUserNick;
|
||||
@property (nonatomic,copy) NSString *recvUserUid;
|
||||
///发送者的头像
|
||||
@property (nonatomic, copy) NSString *sendUserAvatar;
|
||||
///发送者的昵称
|
||||
@property (nonatomic, copy) NSString *sendUserNick;
|
||||
@property (nonatomic,copy) NSString *sendUserUid;
|
||||
///跳转的房间的uid
|
||||
@property (nonatomic,assign) NSInteger roomUid;
|
||||
///平台id
|
||||
|
@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, copy) NSString *zh;
|
||||
@property (nonatomic, copy) NSString *en;
|
||||
@property (nonatomic, copy) NSString *ar;
|
||||
@property (nonatomic, copy) NSString *tr;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -239,7 +239,7 @@
|
||||
}
|
||||
- (UIImageView *)giftNewImageView {
|
||||
if (!_giftNewImageView) {
|
||||
_giftNewImageView = [self createImageView:[UIImage getLanguageText:@"gift_tag_latest"]];
|
||||
_giftNewImageView = [self createImageView:@"gift_tag_latest"];
|
||||
}
|
||||
return _giftNewImageView;
|
||||
}
|
||||
|
@@ -42,9 +42,18 @@
|
||||
self.updateGoldQueue = @[].mutableCopy;
|
||||
[self setupNotification];
|
||||
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapSpace)];
|
||||
tap.delegate = self;
|
||||
[self addGestureRecognizer:tap];
|
||||
UIButton *b = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[b addTarget:self action:@selector(handleTapSpace) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:b];
|
||||
[b mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.leading.trailing.mas_equalTo(self);
|
||||
make.height.mas_equalTo(self.mas_height).multipliedBy(0.75);
|
||||
}];
|
||||
|
||||
// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapSpace)];
|
||||
// tap.delegate = self;
|
||||
// [self addGestureRecognizer:tap];
|
||||
|
||||
[self setupUI];
|
||||
[self setupTimer];
|
||||
[self updateCount];
|
||||
@@ -142,7 +151,7 @@
|
||||
[self addSubview:self.comboGoldLabel];
|
||||
[self.comboGoldLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(44);
|
||||
make.bottom.mas_equalTo(-74);
|
||||
make.bottom.mas_equalTo(-44);
|
||||
}];
|
||||
|
||||
UIImageView *coin = [[UIImageView alloc] initWithImage:kImage(@"moli_money_icon")];
|
||||
@@ -208,7 +217,7 @@
|
||||
|
||||
- (void)updateCurrentGold:(double)gold giftPrice:(double)price isFromWinning:(BOOL)isFromWinning {
|
||||
if (isFromWinning) {
|
||||
[self.updateGoldQueue addObject:[NSString stringWithFormat:@"+ %@", @(gold)]];
|
||||
[self.updateGoldQueue insertObject:[NSString stringWithFormat:@"+ %@", @(gold)] atIndex:0];
|
||||
} else {
|
||||
[self.updateGoldQueue addObject:@(-price).stringValue];
|
||||
self.comboGoldLabel.text = @(gold).stringValue;
|
||||
@@ -230,17 +239,22 @@
|
||||
|
||||
self.isAnimatingUpdateGold = YES;
|
||||
|
||||
if (goldNum.integerValue < 0) {
|
||||
self.updateGoldLabel.textColor = UIColorFromRGB(0xffd54c);
|
||||
} else {
|
||||
self.updateGoldLabel.textColor = UIColorFromRGB(0xBC36FF);
|
||||
}
|
||||
self.updateGoldLabel.text = goldNum.stringValue;
|
||||
self.updateGoldLabel.alpha = 0;
|
||||
[UIView animateWithDuration:0.25 animations:^{
|
||||
[UIView animateWithDuration:0.1 animations:^{
|
||||
[self.updateGoldLabel mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.comboGoldLabel.mas_bottom).offset(-40);
|
||||
make.bottom.mas_equalTo(self.comboGoldLabel.mas_bottom).offset(goldNum.integerValue > 0 ? -60 : -40);;
|
||||
}];
|
||||
self.updateGoldLabel.alpha = 1;
|
||||
[self layoutIfNeeded];
|
||||
} completion:^(BOOL finished) {
|
||||
[UIView animateWithDuration:0.25
|
||||
delay:0.25
|
||||
[UIView animateWithDuration:0.0
|
||||
delay:0.15
|
||||
options:UIViewAnimationOptionCurveLinear
|
||||
animations:^{
|
||||
[self.updateGoldLabel mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
|
@@ -306,16 +306,21 @@
|
||||
canAddGift = true;
|
||||
[tempTitles addObject:tab.nameMap.ar];
|
||||
}
|
||||
} else if (isMSEN()) {
|
||||
if ([tab.nameMap.en length] > 0) {
|
||||
} else if (isMSTR()) {
|
||||
if ([tab.nameMap.tr length] > 0) {
|
||||
canAddGift = true;
|
||||
[tempTitles addObject:tab.nameMap.en];
|
||||
[tempTitles addObject:tab.nameMap.tr];
|
||||
}
|
||||
} else {
|
||||
} else if (isMSZH()) {
|
||||
if ([tab.nameMap.zh length] > 0) {
|
||||
canAddGift = true;
|
||||
[tempTitles addObject:tab.nameMap.zh];
|
||||
}
|
||||
} else {
|
||||
if ([tab.nameMap.en length] > 0) {
|
||||
canAddGift = true;
|
||||
[tempTitles addObject:tab.nameMap.en];
|
||||
}
|
||||
}
|
||||
|
||||
[tempTags addObject:tab];
|
||||
|
@@ -67,7 +67,7 @@ static NSString *kHideGiftViewInteractDot = @"kHideGiftViewInteractDot";//是否
|
||||
[self.giftButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(16);
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.width.mas_equalTo(40);
|
||||
make.width.mas_greaterThanOrEqualTo(40);
|
||||
}];
|
||||
// [self.arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.bottom.mas_equalTo(self.bottomDevideView.mas_top);
|
||||
|
@@ -358,7 +358,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
@kStrongify(self);
|
||||
AttachmentModel *attachment = [[AttachmentModel alloc] init];
|
||||
attachment.first = CustomMessageType_Gift;
|
||||
attachment.second = Custom_Message_Sub_Gift_EmbeddedStyle;
|
||||
attachment.second = Custom_Message_Sub_Gift_Send;
|
||||
[data setObject:[[obj objectForKey:@"uid"] stringValue] forKey:@"targetUid"];
|
||||
[data setObject:[obj objectForKey:@"nick"] forKey:@"targetNick"];
|
||||
[data setObject:[obj objectForKey:@"avatar"] forKey:@"targetAvatar"];
|
||||
|
@@ -830,7 +830,7 @@
|
||||
model.delegate = self.hostDelegate;
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:NO completion:nil];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"userCard"}];
|
||||
return;
|
||||
}
|
||||
|
@@ -53,8 +53,8 @@
|
||||
|
||||
///公屏默认背景的颜色
|
||||
+ (UIColor *)messageBubbleColor {
|
||||
// return UIColorRGBAlpha(0xFFFFFF, 0.15);
|
||||
return UIColorRGBAlpha(0x000000, 0.35);
|
||||
return UIColorRGBAlpha(0xFFFFFF, 0.15);
|
||||
// return UIColorRGBAlpha(0x000000, 0.35);
|
||||
}
|
||||
///公屏文字的颜色
|
||||
+ (UIColor *)messageTextColor {
|
||||
|
@@ -145,22 +145,28 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
self.view.hidden = YES;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
self.view.hidden = NO;
|
||||
});
|
||||
[self initHttp];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self initEvent];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
///设置颜色 stackView 设置背景色 会失败
|
||||
|
||||
[self.view addSubview:self.topTapView];
|
||||
[self.view addSubview:self.backView];
|
||||
[self.view addSubview:self.bottomTapView];
|
||||
|
||||
[self.view addSubview:self.vapView];
|
||||
[self.backView addSubview:self.stackView];
|
||||
if (self.targetUserInfo.infoCardVo) {
|
||||
[self.view addSubview:self.stackView];
|
||||
} else {
|
||||
[self.backView addSubview:self.stackView];
|
||||
}
|
||||
|
||||
[self.view addSubview:self.nobleImageView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.userInfoView];
|
||||
@@ -389,8 +395,7 @@
|
||||
|
||||
- (void)initHttp {
|
||||
[self.presenter getUserInfo:self.cardInfo.uid];
|
||||
[self.presenter getFunctionItemsByUserInfo:self.cardInfo];
|
||||
|
||||
// [self.presenter getFunctionItemsByUserInfo:self.cardInfo];
|
||||
}
|
||||
|
||||
- (void)configRoomDatingPickHeart {
|
||||
@@ -547,6 +552,13 @@
|
||||
#pragma mark - XPUserCardProtocol
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
|
||||
self.targetUserInfo = userInfo;
|
||||
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self initEvent];
|
||||
|
||||
[self.presenter getFunctionItemsByUserInfo:self.cardInfo];
|
||||
|
||||
self.avatarImageView.imageUrl = userInfo.avatar;
|
||||
// self.nobleImageView.imageUrl = userInfo.userInfoCardPic;
|
||||
|
||||
@@ -719,14 +731,15 @@
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
- (void)onGetMicroFunctionArraySuccess:(NSArray<XPUserCardMicroItemModel *> *)array {
|
||||
if (array.count <= 0) {
|
||||
if (array.count <= 0) {
|
||||
if (self.datasource.count > 0){
|
||||
self.collectionView.hidden = NO;
|
||||
[self.collectionView reloadData];
|
||||
[self updateCollectionHeight:self.datasource];
|
||||
}
|
||||
|
||||
return;}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// self.operaStackView.hidden = NO;
|
||||
// self.sepLineView.hidden = NO;
|
||||
@@ -1302,7 +1315,7 @@
|
||||
- (UIView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIView alloc] init];
|
||||
_backView.backgroundColor = [UIColor whiteColor];
|
||||
_backView.backgroundColor = [UIColor whiteColor];
|
||||
_backView.layer.masksToBounds = YES;
|
||||
_backView.layer.cornerRadius = 12;
|
||||
}
|
||||
@@ -1332,6 +1345,7 @@
|
||||
if (!_effectView) {
|
||||
UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
|
||||
_effectView = [[UIVisualEffectView alloc]initWithEffect:effect];
|
||||
_effectView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _effectView;
|
||||
}
|
||||
@@ -1339,6 +1353,7 @@
|
||||
- (NetImageView *)backImageView {
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[NetImageView alloc] init];
|
||||
_backImageView.backgroundColor = [UIColor clearColor];
|
||||
_backImageView.userInteractionEnabled = YES;
|
||||
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_backImageView.image = [UIImageConstant defaultAvatarPlaceholder];
|
||||
@@ -1349,6 +1364,7 @@
|
||||
- (NetImageView *)nobleImageView {
|
||||
if (!_nobleImageView) {
|
||||
_nobleImageView = [[NetImageView alloc] init];
|
||||
_nobleImageView.backgroundColor = [UIColor clearColor];
|
||||
_nobleImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
_nobleImageView.layer.masksToBounds = YES;
|
||||
}
|
||||
@@ -1536,6 +1552,7 @@
|
||||
- (XPUserCardSkillCardView *)skillCardView {
|
||||
if (!_skillCardView) {
|
||||
_skillCardView = [[XPUserCardSkillCardView alloc] init];
|
||||
_skillCardView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _skillCardView;
|
||||
}
|
||||
@@ -1551,7 +1568,8 @@
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.hidden = YES;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
_collectionView.backgroundColor = [UIColor whiteColor];
|
||||
[_collectionView setCornerRadius:16 cornerMask:kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner];
|
||||
[_collectionView registerClass:[XPUserCardItemCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPUserCardItemCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
@@ -1574,6 +1592,7 @@
|
||||
_operaStackView.alignment = UIStackViewAlignmentFill;
|
||||
_operaStackView.spacing = 0;
|
||||
_operaStackView.hidden = YES;
|
||||
_operaStackView.backgroundColor = [UIColor orangeColor];
|
||||
}
|
||||
return _operaStackView;
|
||||
}
|
||||
|
@@ -368,8 +368,10 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
@kWeakify(self);
|
||||
[[GiftComboManager sharedManager] setHandleRoomUIChanged:^(BOOL comboViewDisplay) {
|
||||
@kStrongify(self);
|
||||
self.activityContainerView.hidden = comboViewDisplay;
|
||||
self.menuContainerView.hidden = comboViewDisplay;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.activityContainerView.hidden = comboViewDisplay;
|
||||
self.menuContainerView.hidden = comboViewDisplay;
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user