1.UI修改

2.修复bug
This commit is contained in:
liyuhua
2024-05-17 11:27:36 +08:00
parent b96f270acf
commit d22d0aa9fe
43 changed files with 1082 additions and 936 deletions

View File

@@ -211,6 +211,9 @@
234489082AC3C5DA0070E5D5 /* SudMGP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 234489072AC3C5DA0070E5D5 /* SudMGP.framework */; };
234489092AC3C5FF0070E5D5 /* SudMGP.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 234489072AC3C5DA0070E5D5 /* SudMGP.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
234D821E2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 234D821D2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.m */; };
234E50A52BF5E556005CB6D5 /* MessageContentChatHallHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 234E50A42BF5E556005CB6D5 /* MessageContentChatHallHeadView.m */; };
234E50A82BF5EBDD005CB6D5 /* MSSessionPublicChatHalRightTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 234E50A72BF5EBDD005CB6D5 /* MSSessionPublicChatHalRightTextCell.m */; };
234E50AB2BF5F95A005CB6D5 /* MSSessionPublicChatHalIRightmageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 234E50AA2BF5F95A005CB6D5 /* MSSessionPublicChatHalIRightmageCell.m */; };
234F44E32B3EA4F900E2B532 /* PILineManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234F44E22B3EA4F900E2B532 /* PILineManager.swift */; };
2357145A2BE8BC6C004C81D6 /* MSSessionPublicChatHallVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 235714592BE8BC6C004C81D6 /* MSSessionPublicChatHallVC.m */; };
235714602BE8BD5C004C81D6 /* MSSessionScrollingModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2357145F2BE8BD5C004C81D6 /* MSSessionScrollingModel.m */; };
@@ -222,7 +225,6 @@
235714772BEC9E5E004C81D6 /* MSSessionContextHeadlinesView.m in Sources */ = {isa = PBXBuildFile; fileRef = 235714762BEC9E5E004C81D6 /* MSSessionContextHeadlinesView.m */; };
2357147A2BECA102004C81D6 /* MessageHeadlinesModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 235714792BECA102004C81D6 /* MessageHeadlinesModel.m */; };
235714802BECB217004C81D6 /* MSSessionReleaseHeadlinesPayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2357147F2BECB217004C81D6 /* MSSessionReleaseHeadlinesPayView.m */; };
235714862BECC24F004C81D6 /* MessageContentHeadLinesText.m in Sources */ = {isa = PBXBuildFile; fileRef = 235714852BECC24F004C81D6 /* MessageContentHeadLinesText.m */; };
235714892BECC38F004C81D6 /* MessageHeadlinesTextModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 235714882BECC38F004C81D6 /* MessageHeadlinesTextModel.m */; };
2357148C2BECEE33004C81D6 /* MSSessionPublicChatHalTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2357148B2BECEE33004C81D6 /* MSSessionPublicChatHalTextCell.m */; };
2357148F2BEDC94D004C81D6 /* MSSessionPublicChatHalImageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2357148E2BEDC94D004C81D6 /* MSSessionPublicChatHalImageCell.m */; };
@@ -1943,6 +1945,12 @@
234489072AC3C5DA0070E5D5 /* SudMGP.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SudMGP.framework; sourceTree = "<group>"; };
234D821C2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "YYTextAsyncLayer+PITextAsyncLayer.h"; path = "YuMi/Appdelegate/YYTextAsyncLayer+PITextAsyncLayer.h"; sourceTree = SOURCE_ROOT; };
234D821D2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "YYTextAsyncLayer+PITextAsyncLayer.m"; path = "YuMi/Appdelegate/YYTextAsyncLayer+PITextAsyncLayer.m"; sourceTree = SOURCE_ROOT; };
234E50A32BF5E556005CB6D5 /* MessageContentChatHallHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageContentChatHallHeadView.h; sourceTree = "<group>"; };
234E50A42BF5E556005CB6D5 /* MessageContentChatHallHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageContentChatHallHeadView.m; sourceTree = "<group>"; };
234E50A62BF5EBDD005CB6D5 /* MSSessionPublicChatHalRightTextCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSSessionPublicChatHalRightTextCell.h; sourceTree = "<group>"; };
234E50A72BF5EBDD005CB6D5 /* MSSessionPublicChatHalRightTextCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSSessionPublicChatHalRightTextCell.m; sourceTree = "<group>"; };
234E50A92BF5F95A005CB6D5 /* MSSessionPublicChatHalIRightmageCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSSessionPublicChatHalIRightmageCell.h; sourceTree = "<group>"; };
234E50AA2BF5F95A005CB6D5 /* MSSessionPublicChatHalIRightmageCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSSessionPublicChatHalIRightmageCell.m; sourceTree = "<group>"; };
234F44E22B3EA4F900E2B532 /* PILineManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PILineManager.swift; sourceTree = "<group>"; };
235714582BE8BC6C004C81D6 /* MSSessionPublicChatHallVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSSessionPublicChatHallVC.h; sourceTree = "<group>"; };
235714592BE8BC6C004C81D6 /* MSSessionPublicChatHallVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSSessionPublicChatHallVC.m; sourceTree = "<group>"; };
@@ -1964,8 +1972,6 @@
235714792BECA102004C81D6 /* MessageHeadlinesModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageHeadlinesModel.m; sourceTree = "<group>"; };
2357147E2BECB217004C81D6 /* MSSessionReleaseHeadlinesPayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSSessionReleaseHeadlinesPayView.h; sourceTree = "<group>"; };
2357147F2BECB217004C81D6 /* MSSessionReleaseHeadlinesPayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSSessionReleaseHeadlinesPayView.m; sourceTree = "<group>"; };
235714842BECC24F004C81D6 /* MessageContentHeadLinesText.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageContentHeadLinesText.h; sourceTree = "<group>"; };
235714852BECC24F004C81D6 /* MessageContentHeadLinesText.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageContentHeadLinesText.m; sourceTree = "<group>"; };
235714872BECC38F004C81D6 /* MessageHeadlinesTextModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageHeadlinesTextModel.h; sourceTree = "<group>"; };
235714882BECC38F004C81D6 /* MessageHeadlinesTextModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageHeadlinesTextModel.m; sourceTree = "<group>"; };
2357148A2BECEE33004C81D6 /* MSSessionPublicChatHalTextCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSSessionPublicChatHalTextCell.h; sourceTree = "<group>"; };
@@ -5159,8 +5165,8 @@
E8778AE32988B57B00CF139B /* MessageContentRevokeView.m */,
235714752BEC9E5E004C81D6 /* MSSessionContextHeadlinesView.h */,
235714762BEC9E5E004C81D6 /* MSSessionContextHeadlinesView.m */,
235714842BECC24F004C81D6 /* MessageContentHeadLinesText.h */,
235714852BECC24F004C81D6 /* MessageContentHeadLinesText.m */,
234E50A32BF5E556005CB6D5 /* MessageContentChatHallHeadView.h */,
234E50A42BF5E556005CB6D5 /* MessageContentChatHallHeadView.m */,
);
path = Content;
sourceTree = "<group>";
@@ -8750,8 +8756,12 @@
9B7D804C27537950003DAC0C /* MessageCell.m */,
2357148A2BECEE33004C81D6 /* MSSessionPublicChatHalTextCell.h */,
2357148B2BECEE33004C81D6 /* MSSessionPublicChatHalTextCell.m */,
234E50A62BF5EBDD005CB6D5 /* MSSessionPublicChatHalRightTextCell.h */,
234E50A72BF5EBDD005CB6D5 /* MSSessionPublicChatHalRightTextCell.m */,
2357148D2BEDC94D004C81D6 /* MSSessionPublicChatHalImageCell.h */,
2357148E2BEDC94D004C81D6 /* MSSessionPublicChatHalImageCell.m */,
234E50A92BF5F95A005CB6D5 /* MSSessionPublicChatHalIRightmageCell.h */,
234E50AA2BF5F95A005CB6D5 /* MSSessionPublicChatHalIRightmageCell.m */,
E875A1B629755EE200AB1BBD /* SessionUserInfoTableViewCell.h */,
E875A1B729755EE200AB1BBD /* SessionUserInfoTableViewCell.m */,
E885D531297798E1004DC088 /* SessionSettingTableViewCell.h */,
@@ -11179,7 +11189,6 @@
9B9BBF83288FBFB3004E2E74 /* XPNewUserRoomGiftView.m in Sources */,
E838369A298A59C100112E1C /* MessageTipsView.m in Sources */,
E8899C852785CC69007944BE /* XPRoomDatingAnimationView.m in Sources */,
235714862BECC24F004C81D6 /* MessageContentHeadLinesText.m in Sources */,
2331C16F2A5EB71000E1D940 /* XPNobleCenterNavView.m in Sources */,
E85E7B1B2A4EB0D200B6D00A /* XPMineMainIncomeStatisViewController.m in Sources */,
E84BF7D4277C383700EF8877 /* XPRoomSettingInputView.m in Sources */,
@@ -11261,6 +11270,7 @@
E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */,
E81C1B1F27705F7A0020D1E4 /* XPArrangeMicViewController.m in Sources */,
E8B825C726EA0D9A009E8E9F /* LoginVerifCodeProtocol.h in Sources */,
234E50A52BF5E556005CB6D5 /* MessageContentChatHallHeadView.m in Sources */,
23E9EAAE2A84C9B800B792F2 /* XPMineUserInfoTagView.m in Sources */,
236B2E4E2AA07D06003967A8 /* Api+LittleGame.m in Sources */,
237700E02BC7D78600D661F1 /* MSBaseRTLFlowLayout.m in Sources */,
@@ -11932,6 +11942,7 @@
1464C5ED29A4784F00AF7C94 /* XPMineSimpleUserInfoViewController.m in Sources */,
E8098CB1282E86EF0090B9F0 /* XPMonentsContentView.m in Sources */,
E85E3FA728B7A6F000268DC8 /* MessageContentMonentsView.m in Sources */,
234E50A82BF5EBDD005CB6D5 /* MSSessionPublicChatHalRightTextCell.m in Sources */,
E880B3AF278BE1D800A83B0D /* Api+AcrossRoomPK.m in Sources */,
238B37DC2AC55A2C00BFC9D5 /* XPTreasureFairyBallView.m in Sources */,
23CEFC4B2AFB8FC100576D89 /* BSUIDemoUtil.m in Sources */,
@@ -11994,6 +12005,7 @@
1808072D2731598F001FD836 /* XPNetImageYYLabel.m in Sources */,
E818E348286ECA4B005EDF68 /* XPMonentsPublishViewController.m in Sources */,
9B88E20C28C5EB8300D26FBA /* MessageContentRedPacketView.m in Sources */,
234E50AB2BF5F95A005CB6D5 /* MSSessionPublicChatHalIRightmageCell.m in Sources */,
E896EFAF2771AF0F00AD2CC1 /* XPMineFriendEmptyTableViewCell.m in Sources */,
E8E859E928264F4500EE4857 /* XPRoomTransferMusicViewController.m in Sources */,
18486213271EA9DA005FC5DC /* RtcManager.m in Sources */,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1,22 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_noble_center_tag_title_bg_en@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_noble_center_tag_title_bg_en@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -1,22 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_noble_center_tag_title_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_noble_center_tag_title_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

View File

@@ -0,0 +1,16 @@
//
// MSSessionPublicChatHalIRightmageCell.h
// YuMi
//
// Created by duoban on 2024/5/16.
//
#import <UIKit/UIKit.h>
#import "MessageBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface MSSessionPublicChatHalIRightmageCell : UITableViewCell
- (void)render:(nonnull MessageBaseModel *)model ;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,185 @@
//
// MSSessionPublicChatHalIRightmageCell.m
// YuMi
//
// Created by duoban on 2024/5/16.
//
#import "MSSessionPublicChatHalIRightmageCell.h"
#import "DJDKMIMOMColor.h"
#import "NSObject+MJExtension.h"
#import "QEmotionHelper.h"
#import <NIMSDK/NIMSDK.h>
#import <Masonry/Masonry.h>
#import "SpriteSheetImageManager.h"
#import "MessageHeadlinesTextModel.h"
#import "XPMessageRemoteExtModel.h"
#import "MSSessionPublicChatHalImageCell.h"
#import "MSSessionPublicChatHalImageModel.h"
#import "SDPhotoBrowser.h"
#import "MessageContentChatHallHeadView.h"
@interface MSSessionPublicChatHalIRightmageCell()
@property(nonatomic,strong) MSSessionPublicChatHalImageModel * imageModel;
@property(nonatomic,strong) MessageContentChatHallHeadView *avatarView;
@property(nonatomic,strong) UIImageView *bgImageView;
///
@property (nonatomic,strong) NetImageView *bubbleImageView;
@property(nonatomic,strong) NetImageView *picImageView;
@end
@implementation MSSessionPublicChatHalIRightmageCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if(self){
[self installUI];
[self installConstraints];
}
return self;
}
-(void)installUI{
self.contentView.backgroundColor = [UIColor clearColor];
self.backgroundColor = [UIColor clearColor];
self.selectionStyle = 0;
[self.contentView addSubview:self.avatarView];
[self.contentView addSubview:self.bgImageView];
[self.contentView addSubview:self.bubbleImageView];
[self.contentView addSubview:self.picImageView];
}
-(void)installConstraints{
[self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.trailing.top.equalTo(self.contentView);
make.height.mas_equalTo(kGetScaleWidth(48));
}];
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-kGetScaleWidth(72));
make.width.mas_equalTo(kGetScaleWidth(52));
make.height.mas_equalTo(kGetScaleWidth(36));
make.top.mas_equalTo(kGetScaleWidth(55));
}];
[self.bubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.bgImageView);
}];
[self.picImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.bgImageView).with.insets(UIEdgeInsetsMake(kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10)));
}];
}
#pragma mark -
- (void)render:(nonnull MessageBaseModel *)model {
MSSessionPublicChatHalImageModel * imageModel = (MSSessionPublicChatHalImageModel *)model;
self.imageModel = imageModel;
XPMessageRemoteExtModel *extModel = imageModel.extModel;
if(extModel == nil)return;
[self.avatarView render:model];
[self.picImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(model.contentSize.height);
make.width.mas_equalTo(model.contentSize.width);
}];
if (imageModel.image) {
self.picImageView.image = imageModel.image;
}else {
[self.picImageView loadImageWithUrl:imageModel.imageUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.picImageView.image = image;
}];
}
[self.bgImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(55));
make.trailing.mas_equalTo(-kGetScaleWidth(72));
make.width.mas_equalTo(model.contentSize.width+kGetScaleWidth(10));
make.height.mas_equalTo(model.contentSize.height+kGetScaleWidth(10));
make.bottom.mas_equalTo(-kGetScaleWidth(10));
}];
}
#pragma mark - SDPhotoBrowserDelegate
- (NSURL *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index {
return [NSURL URLWithString:self.imageModel.url];
}
- (UIImage *)photoBrowser:(SDPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index {
return [UIImageConstant defalutBannerPlaceholder];
}
- (UIImage *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageForIndex:(NSInteger)index{
if(self.imageModel.url == nil && self.imageModel.image != nil){
return self.imageModel.image;
}
return nil;
}
-(void)didLeftTapImage{
SDPhotoBrowser *browser = [[SDPhotoBrowser alloc]init];
browser.sourceImagesContainerView = self;
browser.delegate = self;
browser.imageCount = 1;
browser.currentImageIndex = 0;
browser.isMe = NO;
[browser show];
}
-(void)didRigthTapImage{
SDPhotoBrowser *browser = [[SDPhotoBrowser alloc]init];
browser.sourceImagesContainerView = self;
browser.delegate = self;
browser.imageCount = 1;
browser.currentImageIndex = 0;
browser.isMe = NO;
[browser show];
}
- (UIImage*)resizableImage:(UIImage *)image {
//
CGFloat top = (image.size.height - 1) / 2;
CGFloat left = (image.size.width - 1) / 2;
CGFloat right = (image.size.width - 1) / 2;
CGFloat bottom = (image.size.height - 1) / 2;
return [image resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right) resizingMode:UIImageResizingModeStretch];
}
- (MessageContentChatHallHeadView *)avatarView{
if(!_avatarView){
_avatarView = [[MessageContentChatHallHeadView alloc]initWithFrame:CGRectZero isSelf:NO];
}
return _avatarView;
}
- (UIImageView *)bgImageView{
if(!_bgImageView){
_bgImageView = [UIImageView new];
_bgImageView.userInteractionEnabled = YES;
_bgImageView.image = [self resizableImage:kImage(@"ms_message_headlines_text_left")];
}
return _bgImageView;
}
- (NetImageView *)bubbleImageView{
if(!_bubbleImageView){
_bubbleImageView = [[NetImageView alloc] init];
}
return _bubbleImageView;
}
- (NetImageView *)picImageView{
if(!_picImageView){
_picImageView = [NetImageView new];
_picImageView.userInteractionEnabled = YES;
_picImageView.layer.masksToBounds = YES;
_picImageView.contentMode = UIViewContentModeScaleAspectFill;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didLeftTapImage)];
[_picImageView addGestureRecognizer:tap];
}
return _picImageView;
}
@end

View File

@@ -6,7 +6,7 @@
//
#import <UIKit/UIKit.h>
#import "MessageBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface MSSessionPublicChatHalImageCell : UITableViewCell

View File

@@ -15,40 +15,14 @@
#import "MSSessionPublicChatHalImageCell.h"
#import "MSSessionPublicChatHalImageModel.h"
#import "SDPhotoBrowser.h"
#import "MessageContentChatHallHeadView.h"
@interface MSSessionPublicChatHalImageCell()<SDPhotoBrowserDelegate>
@property(nonatomic,strong) MSSessionPublicChatHalImageModel * imageModel;
///
@property (nonatomic,strong) NIMMessage *message;
///
@property (nonatomic,strong) YYAnimatedImageView *headWearImageView;
///
@property (nonatomic,strong) YYAnimatedImageView *rightHeadWearImageView;
///
@property (nonatomic, strong) SpriteSheetImageManager *manager;
/**
*/
@property (nonatomic, strong) NetImageView * leftAvatar;
/**
*/
@property (nonatomic, strong) NetImageView * rightAvatar;
@property(nonatomic,strong) YYLabel *leftNameView;
@property(nonatomic,strong) UIImageView *leftBgImage;
@property(nonatomic,strong) UIImageView *rightBgImage;
@property(nonatomic,strong) MessageContentChatHallHeadView *avatarView;
@property(nonatomic,strong) UIImageView *bgImageView;
///
@property (nonatomic,strong) NetImageView *leftBubbleImageView;
///
@property (nonatomic,strong) NetImageView *rightBubbleImageView;
@property(nonatomic,strong) NetImageView *leftPicImageView;
@property(nonatomic,strong) NetImageView *rightPicImageView;
@property (nonatomic,strong) NetImageView *bubbleImageView;
@property(nonatomic,strong) NetImageView *picImageView;
@end
@implementation MSSessionPublicChatHalImageCell
@@ -65,217 +39,67 @@
self.contentView.backgroundColor = [UIColor clearColor];
self.backgroundColor = [UIColor clearColor];
self.selectionStyle = 0;
[self addSubview:self.leftAvatar];
[self addSubview:self.headWearImageView];
[self addSubview:self.rightAvatar];
[self addSubview:self.rightHeadWearImageView];
[self addSubview:self.leftNameView];
[self addSubview:self.leftBgImage];
[self addSubview:self.rightBgImage];
[self addSubview:self.leftBubbleImageView];
[self addSubview:self.rightBubbleImageView];
[self.leftBgImage addSubview:self.leftPicImageView];
[self.rightBgImage addSubview:self.rightPicImageView];
[self.contentView addSubview:self.avatarView];
[self.contentView addSubview:self.bgImageView];
[self.contentView addSubview:self.bubbleImageView];
[self.contentView addSubview:self.picImageView];
}
-(void)installConstraints{
[self.leftAvatar mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(15));
make.width.height.mas_equalTo(kGetScaleWidth(48));
make.top.mas_equalTo(kGetScaleWidth(10));
[self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.top.equalTo(self.contentView);
make.height.mas_equalTo(kGetScaleWidth(48));
}];
[self.headWearImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.leftAvatar).with.insets(UIEdgeInsetsMake(-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10)));
}];
[self.leftNameView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(21));
make.height.mas_equalTo(kGetScaleWidth(14));
make.leading.mas_equalTo(kGetScaleWidth(72));
make.width.mas_lessThanOrEqualTo(kGetScaleWidth(240));
}];
[self.rightAvatar mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.width.height.equalTo(self.leftAvatar);
make.trailing.mas_equalTo(-kGetScaleWidth(15));
}];
[self.rightHeadWearImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.rightAvatar).with.insets(UIEdgeInsetsMake(-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10)));
}];
[self.leftBgImage mas_makeConstraints:^(MASConstraintMaker *make) {
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(72));
make.width.mas_equalTo(kGetScaleWidth(52));
make.height.mas_equalTo(kGetScaleWidth(36));
make.top.mas_equalTo(kGetScaleWidth(45));
make.top.mas_equalTo(kGetScaleWidth(55));
}];
[self.rightBgImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-kGetScaleWidth(72));
make.centerY.equalTo(self.rightAvatar);
make.width.mas_equalTo(kGetScaleWidth(52));
make.height.mas_greaterThanOrEqualTo(kGetScaleWidth(36));
}];
[self.leftBubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.leftBgImage);
[self.bubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.bgImageView);
}];
[self.rightBubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.rightBgImage);
}];
[self.leftPicImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.leftBgImage).with.insets(UIEdgeInsetsMake(kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10)));
[self.picImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.bgImageView).with.insets(UIEdgeInsetsMake(kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10)));
}];
[self.rightPicImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.rightBgImage).with.insets(UIEdgeInsetsMake(kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10)));
}];
self.leftAvatar.hidden = YES;
self.leftNameView.hidden = YES;
self.leftBgImage.hidden = YES;
self.headWearImageView.hidden = YES;
self.leftBubbleImageView.hidden = YES;
self.rightAvatar.hidden = YES;
self.rightBgImage.hidden = YES;
self.rightHeadWearImageView.hidden = YES;
self.rightBubbleImageView.hidden = YES;
}
#pragma mark -
- (void)render:(nonnull MessageBaseModel *)model {
self.message = model.message;
MSSessionPublicChatHalImageModel * imageModel = (MSSessionPublicChatHalImageModel *)model;
self.imageModel = imageModel;
XPMessageRemoteExtModel *extModel = imageModel.extModel;
if(extModel == nil)return;
self.leftAvatar.hidden = YES;
self.leftNameView.hidden = YES;
self.leftBgImage.hidden = YES;
self.headWearImageView.hidden = YES;
self.leftPicImageView.hidden = YES;
self.rightPicImageView.hidden = YES;
self.leftBubbleImageView.hidden = YES;
self.rightAvatar.hidden = YES;
self.rightBgImage.hidden = YES;
self.rightHeadWearImageView.hidden = YES;
self.rightBubbleImageView.hidden = YES;
if(imageModel.isSelf){
[self.rightPicImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(model.contentSize.height);
make.width.mas_equalTo(model.contentSize.width);
}];
if (imageModel.image) {
self.rightPicImageView.image = imageModel.image;
}else {
[self.rightPicImageView loadImageWithUrl:imageModel.imageUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.rightPicImageView.image = image;
}];
}
[self.rightBgImage mas_remakeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-kGetScaleWidth(72));
make.top.mas_equalTo(kGetScaleWidth(21));
make.width.mas_equalTo(model.contentSize.width+kGetScaleWidth(10));
make.height.mas_equalTo(model.contentSize.height+kGetScaleWidth(10));
}];
self.rightAvatar.hidden = NO;
self.rightBgImage.hidden = NO;
self.rightHeadWearImageView.hidden = NO;
self.rightBubbleImageView.hidden = NO;
self.leftPicImageView.hidden = YES;
self.rightPicImageView.hidden = NO;
self.rightAvatar.image = nil;
[self.rightAvatar loadImageWithUrl:extModel.avatar completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.rightAvatar.image = image;
}];
self.rightBubbleImageView.image = nil;
self.rightBgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_right")];
[self.rightBubbleImageView loadImageWithUrl:extModel.iosBubbleUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.rightBgImage.image = nil;
UIImage *image1 = [UIImage imageWithCGImage:image.CGImage scale:2.0 orientation:UIImageOrientationUp];
self.rightBubbleImageView.image = [self resizableImage:image1];
}];
NSString *headwearUrl = extModel.headwearUrl;
self.rightHeadWearImageView.image = nil;
if (headwearUrl.length > 0) {
NSURL *url = [NSURL URLWithString:headwearUrl];
@kWeakify(self);
[self.manager loadSpriteSheetImageWithURL:url completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
@kStrongify(self);
self.rightHeadWearImageView.image = sprit;
} failureBlock:^(NSError * _Nullable error) {
}];
}
return;
}
[self.leftPicImageView mas_updateConstraints:^(MASConstraintMaker *make) {
[self.avatarView render:model];
[self.picImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(model.contentSize.height);
make.width.mas_equalTo(model.contentSize.width);
}];
if (imageModel.image) {
self.leftPicImageView.image = imageModel.image;
self.picImageView.image = imageModel.image;
}else {
[self.leftPicImageView loadImageWithUrl:imageModel.imageUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.leftPicImageView.image = image;
[self.picImageView loadImageWithUrl:imageModel.imageUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.picImageView.image = image;
}];
}
[self.leftBgImage mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(45));
[self.bgImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(55));
make.leading.mas_equalTo(kGetScaleWidth(72));
make.width.mas_equalTo(model.contentSize.width+kGetScaleWidth(10));
make.height.mas_equalTo(model.contentSize.height+kGetScaleWidth(10));
make.bottom.mas_equalTo(-kGetScaleWidth(10));
}];
NSString *headwearUrl = extModel.headwearUrl;
self.headWearImageView.image = nil;
if (headwearUrl.length > 0) {
NSURL *url = [NSURL URLWithString:headwearUrl];
@kWeakify(self);
[self.manager loadSpriteSheetImageWithURL:url completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
@kStrongify(self);
self.headWearImageView.image = sprit;
} failureBlock:^(NSError * _Nullable error) {
}];
}
self.leftAvatar.hidden = NO;
self.leftNameView.hidden = NO;
self.leftBgImage.hidden = NO;
self.headWearImageView.hidden = NO;
self.leftPicImageView.hidden = NO;
self.rightPicImageView.hidden = YES;
self.leftBubbleImageView.hidden = NO;
self.leftAvatar.image = nil;
[self.leftAvatar loadImageWithUrl:extModel.avatar completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.leftAvatar.image = image;
}];
self.leftBgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_left")];
[self.leftBubbleImageView loadImageWithUrl:extModel.iosBubbleUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.leftBgImage.image = nil;
UIImage *image1 = [UIImage imageWithCGImage:image.CGImage scale:2.0 orientation:UIImageOrientationUp];
self.leftBubbleImageView.image = [self resizableImage:image1];
}];
self.leftNameView.attributedText = imageModel.nameAtt;
}
#pragma mark - SDPhotoBrowserDelegate
- (NSURL *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index {
@@ -317,110 +141,42 @@
CGFloat bottom = (image.size.height - 1) / 2;
return [image resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right) resizingMode:UIImageResizingModeStretch];
}
- (NetImageView *)leftAvatar{
if(!_leftAvatar){
NetImageConfig *config = [NetImageConfig new];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_leftAvatar = [[NetImageView alloc]initWithConfig:config];
_leftAvatar.layer.cornerRadius = kGetScaleWidth(48)/2;
_leftAvatar.layer.masksToBounds = YES;
- (MessageContentChatHallHeadView *)avatarView{
if(!_avatarView){
_avatarView = [[MessageContentChatHallHeadView alloc]initWithFrame:CGRectZero isSelf:NO];
}
return _leftAvatar;
}
- (NetImageView *)rightAvatar{
if(!_rightAvatar){
NetImageConfig *config = [NetImageConfig new];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_rightAvatar = [[NetImageView alloc]initWithConfig:config];
_rightAvatar.layer.cornerRadius = kGetScaleWidth(48)/2;
_rightAvatar.layer.masksToBounds = YES;
}
return _rightAvatar;
}
- (YYLabel *)leftNameView{
if(!_leftNameView){
_leftNameView = [YYLabel new];
}
return _leftNameView;
return _avatarView;
}
- (UIImageView *)leftBgImage{
if(!_leftBgImage){
_leftBgImage = [UIImageView new];
_leftBgImage.userInteractionEnabled = YES;
_leftBgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_left")];
- (UIImageView *)bgImageView{
if(!_bgImageView){
_bgImageView = [UIImageView new];
_bgImageView.userInteractionEnabled = YES;
_bgImageView.image = [self resizableImage:kImage(@"ms_message_headlines_text_left")];
}
return _leftBgImage;
return _bgImageView;
}
- (UIImageView *)rightBgImage{
if(!_rightBgImage){
_rightBgImage = [UIImageView new];
_rightBgImage.userInteractionEnabled = YES;
_rightBgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_right")];
}
return _rightBgImage;
}
- (NetImageView *)leftBubbleImageView{
if(!_leftBubbleImageView){
_leftBubbleImageView = [[NetImageView alloc] init];
- (NetImageView *)bubbleImageView{
if(!_bubbleImageView){
_bubbleImageView = [[NetImageView alloc] init];
}
return _leftBubbleImageView;
return _bubbleImageView;
}
- (NetImageView *)rightBubbleImageView{
if(!_rightBubbleImageView){
_rightBubbleImageView = [[NetImageView alloc] init];
}
return _rightBubbleImageView;
}
- (YYAnimatedImageView *)headWearImageView {
if (!_headWearImageView) {
_headWearImageView = [[YYAnimatedImageView alloc] init];
_headWearImageView.backgroundColor = [UIColor clearColor];
_headWearImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _headWearImageView;
}
- (YYAnimatedImageView *)rightHeadWearImageView {
if (!_rightHeadWearImageView) {
_rightHeadWearImageView = [[YYAnimatedImageView alloc] init];
_rightHeadWearImageView.backgroundColor = [UIColor clearColor];
_rightHeadWearImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _rightHeadWearImageView;
}
- (SpriteSheetImageManager *)manager {
if (!_manager) {
_manager = [[SpriteSheetImageManager alloc] init];
}
return _manager;
}
- (NetImageView *)leftPicImageView{
if(!_leftPicImageView){
_leftPicImageView = [NetImageView new];
_leftPicImageView.userInteractionEnabled = YES;
_leftPicImageView.layer.masksToBounds = YES;
_leftPicImageView.contentMode = UIViewContentModeScaleAspectFill;
- (NetImageView *)picImageView{
if(!_picImageView){
NetImageConfig *config = [NetImageConfig new];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_picImageView = [[NetImageView alloc]initWithConfig:config];
_picImageView.userInteractionEnabled = YES;
_picImageView.layer.cornerRadius = kGetScaleWidth(8);
_picImageView.layer.masksToBounds = YES;
_picImageView.contentMode = UIViewContentModeScaleAspectFill;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didLeftTapImage)];
[_leftPicImageView addGestureRecognizer:tap];
[_picImageView addGestureRecognizer:tap];
}
return _leftPicImageView;
}
- (NetImageView *)rightPicImageView{
if(!_rightPicImageView){
_rightPicImageView = [NetImageView new];
_rightPicImageView.userInteractionEnabled = YES;
_rightPicImageView.layer.masksToBounds = YES;
_rightPicImageView.contentMode = UIViewContentModeScaleAspectFill;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didRigthTapImage)];
[_rightPicImageView addGestureRecognizer:tap];
}
return _rightPicImageView;
return _picImageView;
}
@end

View File

@@ -0,0 +1,16 @@
//
// MSSessionPublicChatHalRightTextCell.h
// YuMi
//
// Created by duoban on 2024/5/16.
//
#import <UIKit/UIKit.h>
#import "MessageBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface MSSessionPublicChatHalRightTextCell : UITableViewCell
- (void)render:(nonnull MessageBaseModel *)model ;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,167 @@
//
// MSSessionPublicChatHalRightTextCell.m
// YuMi
//
// Created by duoban on 2024/5/16.
//
#import "DJDKMIMOMColor.h"
#import "NSObject+MJExtension.h"
#import "QEmotionHelper.h"
#import <NIMSDK/NIMSDK.h>
#import <Masonry/Masonry.h>
#import "SpriteSheetImageManager.h"
#import "MessageHeadlinesTextModel.h"
#import "XPMessageRemoteExtModel.h"
#import "MessageContentChatHallHeadView.h"
#import "MSSessionPublicChatHalRightTextCell.h"
@interface MSSessionPublicChatHalRightTextCell()
/**
*/
@property (nonatomic, strong) YYLabel * messageText;
@property(nonatomic,strong) UIImageView *bgImage;
///
@property (nonatomic,strong) NetImageView *bubbleImageView;
@property(nonatomic,strong) MessageContentChatHallHeadView *avatarView;
@end
@implementation MSSessionPublicChatHalRightTextCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if(self){
[self installUI];
[self installConstraints];
}
return self;
}
- (void)render:(nonnull MessageBaseModel *)model {
MessageHeadlinesTextModel * textModel = (MessageHeadlinesTextModel *)model;
XPMessageRemoteExtModel *extModel = textModel.extModel;
if(extModel == nil)return;
[self.avatarView render:model];
self.messageText.attributedText = textModel.textAttribute;
self.bubbleImageView.image = nil;
self.bgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_right")];
NSString *iosBubbleUrl = extModel.iosBubbleUrl;
if(iosBubbleUrl.length > 0){
[self.bubbleImageView loadImageWithUrl:extModel.iosBubbleUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.bgImage.image = nil;
UIImage *image1 = [UIImage imageWithCGImage:image.CGImage scale:2.0 orientation:UIImageOrientationUp];
self.bubbleImageView.image = [self resizableImage:image1];
}];
}
}
-(void)installUI{
self.contentView.backgroundColor = [UIColor clearColor];
self.backgroundColor = [UIColor clearColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.avatarView];
[self.contentView addSubview:self.bgImage];
[self.contentView addSubview:self.bubbleImageView];
[self.contentView addSubview:self.messageText];
}
-(void)installConstraints{
[self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.top.equalTo(self.contentView);
make.height.mas_equalTo(kGetScaleWidth(48));
}];
[self.bgImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.messageText).offset(-kGetScaleWidth(10));
make.top.equalTo(self.messageText).offset(-kGetScaleWidth(10));
make.bottom.mas_equalTo(self.messageText).offset(kGetScaleWidth(10));
make.right.mas_equalTo(self.messageText).offset(kGetScaleWidth(10));
}];
[self.messageText mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(55));
make.trailing.mas_equalTo(-kGetScaleWidth(82));
make.bottom.mas_equalTo(-kGetScaleWidth(10));
}];
[self.bubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.bgImage);
}];
}
#pragma mark -
- (UIImage*)resizableImage:(UIImage *)image {
//
CGFloat top = (image.size.height - 1) / 2;
CGFloat left = (image.size.width - 1) / 2;
CGFloat right = (image.size.width - 1) / 2;
CGFloat bottom = (image.size.height - 1) / 2;
return [image resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right) resizingMode:UIImageResizingModeStretch];
}
- (UIImageView *)bgImage{
if(!_bgImage){
_bgImage = [UIImageView new];
_bgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_right")];
}
return _bgImage;
}
- (NetImageView *)bubbleImageView{
if(!_bubbleImageView){
_bubbleImageView = [[NetImageView alloc] init];
}
return _bubbleImageView;
}
- (YYLabel *)messageText {
if (!_messageText) {
_messageText = [[YYLabel alloc]initWithFrame:CGRectZero];
_messageText.textColor = DJDKMIMOMColor.mainTextColor;
_messageText.numberOfLines = 0;
_messageText.font = kFontMedium(14);
_messageText.textColor = [UIColor whiteColor];
_messageText.textAlignment = NSTextAlignmentLeft;
_messageText.userInteractionEnabled = YES;
_messageText.preferredMaxLayoutWidth = kGetScaleWidth(220);
}
return _messageText;
}
- (MessageContentChatHallHeadView *)avatarView{
if(!_avatarView){
_avatarView = [[MessageContentChatHallHeadView alloc]initWithFrame:CGRectZero isSelf:YES];
}
return _avatarView;
}
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end

View File

@@ -6,9 +6,25 @@
//
#import "MSSessionPublicChatHalTextCell.h"
#import "MessageContentHeadLinesText.h"
#import "DJDKMIMOMColor.h"
#import "NSObject+MJExtension.h"
#import "QEmotionHelper.h"
#import <NIMSDK/NIMSDK.h>
#import <Masonry/Masonry.h>
#import "SpriteSheetImageManager.h"
#import "MessageHeadlinesTextModel.h"
#import "XPMessageRemoteExtModel.h"
#import "MessageContentChatHallHeadView.h"
@interface MSSessionPublicChatHalTextCell ()
@property(nonatomic,strong) MessageContentHeadLinesText *textView;
/**
*/
@property (nonatomic, strong) YYLabel * messageText;
@property(nonatomic,strong) UIImageView *bgImage;
///
@property (nonatomic,strong) NetImageView *bubbleImageView;
@property(nonatomic,strong) MessageContentChatHallHeadView *avatarView;
@end
@implementation MSSessionPublicChatHalTextCell
@@ -21,26 +37,113 @@
return self;
}
- (void)render:(nonnull MessageBaseModel *)model {
[self.textView render:model];
MessageHeadlinesTextModel * textModel = (MessageHeadlinesTextModel *)model;
XPMessageRemoteExtModel *extModel = textModel.extModel;
if(extModel == nil)return;
[self.avatarView render:model];
self.messageText.textColor = [UIColor whiteColor];
self.bubbleImageView.image = nil;
NSString *iosBubbleUrl = extModel.iosBubbleUrl;
_bgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_left")];
if(iosBubbleUrl.length > 0){
[self.bubbleImageView loadImageWithUrl:extModel.iosBubbleUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.bgImage.image = nil;
self.messageText.textColor = UIColorFromRGB(0x333333);
UIImage *image1 = [UIImage imageWithCGImage:image.CGImage scale:2.0 orientation:UIImageOrientationUp];
self.bubbleImageView.image = [self resizableImage:image1];
}];
}
self.messageText.attributedText = textModel.textAttribute;
}
-(void)installUI{
self.contentView.backgroundColor = [UIColor clearColor];
self.backgroundColor = [UIColor clearColor];
self.selectionStyle = 0;
[self.contentView addSubview:self.textView];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.avatarView];
[self.contentView addSubview:self.bgImage];
[self.contentView addSubview:self.bubbleImageView];
[self.contentView addSubview:self.messageText];
}
-(void)installConstraints{
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.contentView);
[self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.top.equalTo(self.contentView);
make.height.mas_equalTo(kGetScaleWidth(48));
}];
[self.messageText mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(55));
make.leading.mas_equalTo(kGetScaleWidth(82));
make.bottom.mas_equalTo(-kGetScaleWidth(10));
}];
[self.bgImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.messageText).offset(-kGetScaleWidth(10));
make.top.equalTo(self.messageText).offset(-kGetScaleWidth(10));
make.bottom.mas_equalTo(self.messageText).offset(kGetScaleWidth(10));
make.right.mas_equalTo(self.messageText).offset(kGetScaleWidth(10));
}];
[self.bubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.bgImage);
}];
}
#pragma mark -
- (MessageContentHeadLinesText *)textView{
if(!_textView){
_textView = [[MessageContentHeadLinesText alloc]initWithFrame:CGRectZero];
}
return _textView;
- (UIImage*)resizableImage:(UIImage *)image {
//
CGFloat top = (image.size.height - 1) / 2;
CGFloat left = (image.size.width - 1) / 2;
CGFloat right = (image.size.width - 1) / 2;
CGFloat bottom = (image.size.height - 1) / 2;
return [image resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right) resizingMode:UIImageResizingModeStretch];
}
- (UIImageView *)bgImage{
if(!_bgImage){
_bgImage = [UIImageView new];
_bgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_left")];
}
return _bgImage;
}
- (NetImageView *)bubbleImageView{
if(!_bubbleImageView){
_bubbleImageView = [[NetImageView alloc] init];
}
return _bubbleImageView;
}
- (YYLabel *)messageText {
if (!_messageText) {
_messageText = [[YYLabel alloc]initWithFrame:CGRectZero];
_messageText.textColor = DJDKMIMOMColor.mainTextColor;
_messageText.numberOfLines = 0;
_messageText.font = kFontMedium(14);
_messageText.textColor = [UIColor whiteColor];
_messageText.textAlignment = NSTextAlignmentLeft;
_messageText.userInteractionEnabled = YES;
_messageText.preferredMaxLayoutWidth = kGetScaleWidth(220);
}
return _messageText;
}
- (MessageContentChatHallHeadView *)avatarView{
if(!_avatarView){
_avatarView = [[MessageContentChatHallHeadView alloc]initWithFrame:CGRectZero isSelf:NO];
}
return _avatarView;
}
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
@@ -48,7 +151,7 @@
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}

View File

@@ -0,0 +1,17 @@
//
// MessageContentChatHallHeadView.h
// YuMi
//
// Created by duoban on 2024/5/16.
//
#import <UIKit/UIKit.h>
#import "MessageBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface MessageContentChatHallHeadView : UIView
-(instancetype)initWithFrame:(CGRect)frame isSelf:(BOOL)isSelf;
- (void)render:(nonnull MessageBaseModel *)model;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,196 @@
//
// MessageContentChatHallHeadView.m
// YuMi
//
// Created by duoban on 2024/5/16.
//
#import "MessageContentChatHallHeadView.h"
#import "DJDKMIMOMColor.h"
#import "NSObject+MJExtension.h"
#import "QEmotionHelper.h"
#import <NIMSDK/NIMSDK.h>
#import <Masonry/Masonry.h>
#import "SpriteSheetImageManager.h"
#import "MessageHeadlinesTextModel.h"
#import "XPMessageRemoteExtModel.h"
#import "MSSessionPublicChatHalImageModel.h"
@interface MessageContentChatHallHeadView()
@property(nonatomic,assign) BOOL isSelf;
///
@property (nonatomic,strong) YYAnimatedImageView *headWearImageView;
///
@property (nonatomic, strong) SpriteSheetImageManager *manager;
/**
*/
@property (nonatomic, strong) NetImageView * avatarView;
@property(nonatomic,strong) UILabel *nameView;
@property(nonatomic,strong) NetImageView *experImage;
@property(nonatomic,strong) NetImageView *charmImage;
@end
@implementation MessageContentChatHallHeadView
-(instancetype)initWithFrame:(CGRect)frame isSelf:(BOOL)isSelf{
self = [super initWithFrame:frame];
if(self){
self.isSelf = isSelf;
[self installUI];
[self installConstraints];
}
return self;
}
-(void)installUI{
[self addSubview:self.avatarView];
[self addSubview:self.headWearImageView];
[self addSubview:self.nameView];
[self addSubview:self.experImage];
[self addSubview:self.charmImage];
}
-(void)installConstraints{
if(self.isSelf){
[self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-kGetScaleWidth(15));
make.width.height.mas_equalTo(kGetScaleWidth(48));
make.top.mas_equalTo(kGetScaleWidth(10));
}];
[self.headWearImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.avatarView).with.insets(UIEdgeInsetsMake(-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10)));
}];
[self.nameView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(21));
make.height.mas_equalTo(kGetScaleWidth(18));
make.trailing.mas_equalTo(-kGetScaleWidth(72));
make.leading.equalTo(self.experImage.mas_trailing).mas_offset(kGetScaleWidth(4));
}];
[self.experImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(36));
make.height.mas_equalTo(kGetScaleWidth(18));
make.leading.equalTo(self.charmImage.mas_trailing).mas_offset(kGetScaleWidth(4));
make.centerY.equalTo(self.nameView);
}];
[self.charmImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(36));
make.height.mas_equalTo(kGetScaleWidth(18));
make.leading.mas_greaterThanOrEqualTo(kGetScaleWidth(kGetScaleWidth(64)));
make.centerY.equalTo(self.nameView);
}];
return;
}
[self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(15));
make.width.height.mas_equalTo(kGetScaleWidth(48));
make.top.mas_equalTo(kGetScaleWidth(10));
}];
[self.headWearImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.avatarView).with.insets(UIEdgeInsetsMake(-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10)));
}];
[self.nameView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(21));
make.height.mas_equalTo(kGetScaleWidth(18));
make.leading.mas_equalTo(kGetScaleWidth(72));
make.trailing.equalTo(self.experImage.mas_leading).mas_offset(-kGetScaleWidth(4));
}];
[self.experImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(36));
make.height.mas_equalTo(kGetScaleWidth(18));
make.trailing.equalTo(self.charmImage.mas_leading).mas_offset(-kGetScaleWidth(4));
make.centerY.equalTo(self.nameView);
}];
[self.charmImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(36));
make.height.mas_equalTo(kGetScaleWidth(18));
make.trailing.mas_lessThanOrEqualTo(-kGetScaleWidth(64));
make.centerY.equalTo(self.nameView);
}];
}
- (void)render:(nonnull MessageBaseModel *)model {
XPMessageRemoteExtModel *extModel ;
if([model isKindOfClass:[MSSessionPublicChatHalImageModel class]]){
MSSessionPublicChatHalImageModel *imageModel = (MSSessionPublicChatHalImageModel *)model;
extModel = imageModel.extModel;
}else{
MessageHeadlinesTextModel * textModel = (MessageHeadlinesTextModel *)model;
extModel = textModel.extModel;
}
if(extModel == nil)return;
self.avatarView.image = nil;
[self.avatarView loadImageWithUrl:extModel.avatar completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.avatarView.image = image;
}];
self.experImage.image = nil;
[self.experImage loadImageWithUrl:extModel.experUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.experImage.image = image;
}];
self.charmImage.image = nil;
[self.charmImage loadImageWithUrl:extModel.charmUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.charmImage.image = image;
}];
self.nameView.text = extModel.nick;
self.headWearImageView.image = nil;
NSString *headwearUrl = extModel.headwearUrl;
if (headwearUrl.length > 0) {
NSURL *url = [NSURL URLWithString:headwearUrl];
@kWeakify(self);
[self.manager loadSpriteSheetImageWithURL:url completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
@kStrongify(self);
self.headWearImageView.image = sprit;
} failureBlock:^(NSError * _Nullable error) {
}];
}
}
#pragma mark -
- (NetImageView *)avatarView{
if(!_avatarView){
NetImageConfig *config = [NetImageConfig new];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_avatarView = [[NetImageView alloc]initWithConfig:config];
_avatarView.layer.cornerRadius = kGetScaleWidth(48)/2;
_avatarView.layer.masksToBounds = YES;
}
return _avatarView;
}
- (UILabel *)nameView{
if(!_nameView){
_nameView = [UILabel labelInitWithText:@"" font:kFontBold(14) textColor:UIColorFromRGB(0x333333)];
_nameView.lineBreakMode = self.isSelf ? NSLineBreakByTruncatingHead : NSLineBreakByTruncatingTail;
}
return _nameView;
}
- (YYAnimatedImageView *)headWearImageView {
if (!_headWearImageView) {
_headWearImageView = [[YYAnimatedImageView alloc] init];
_headWearImageView.backgroundColor = [UIColor clearColor];
_headWearImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _headWearImageView;
}
- (SpriteSheetImageManager *)manager {
if (!_manager) {
_manager = [[SpriteSheetImageManager alloc] init];
}
return _manager;
}
- (NetImageView *)experImage{
if(!_experImage){
_experImage = [NetImageView new];
}
return _experImage;
}
- (NetImageView *)charmImage{
if(!_charmImage){
_charmImage = [NetImageView new];
}
return _charmImage;
}
@end

View File

@@ -1,16 +0,0 @@
//
// MessageContentHeadLinesText.h
// YuMi
//
// Created by duoban on 2024/5/9.
//
#import <UIKit/UIKit.h>
#import "MessageBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface MessageContentHeadLinesText : UIView
- (void)render:(nonnull MessageBaseModel *)model;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,346 +0,0 @@
//
// MessageContentHeadLinesText.m
// YuMi
//
// Created by duoban on 2024/5/9.
//
#import "MessageContentHeadLinesText.h"
#import "DJDKMIMOMColor.h"
#import "NSObject+MJExtension.h"
#import "QEmotionHelper.h"
#import <NIMSDK/NIMSDK.h>
#import <Masonry/Masonry.h>
#import "SpriteSheetImageManager.h"
#import "MessageHeadlinesTextModel.h"
#import "XPMessageRemoteExtModel.h"
#define MESSAGE_TEXT_PADDING 10
@interface MessageContentHeadLinesText()
/**
*/
@property (nonatomic, strong) YYLabel * messageText;
@property (nonatomic, strong) YYLabel * rightMessageText;
///
@property (nonatomic,strong) NIMMessage *message;
///
@property (nonatomic,strong) YYAnimatedImageView *headWearImageView;
///
@property (nonatomic,strong) YYAnimatedImageView *rightHeadWearImageView;
///
@property (nonatomic, strong) SpriteSheetImageManager *manager;
/**
*/
@property (nonatomic, strong) NetImageView * leftAvatar;
/**
*/
@property (nonatomic, strong) NetImageView * rightAvatar;
@property(nonatomic,strong) YYLabel *leftNameView;
@property(nonatomic,strong) UIImageView *leftBgImage;
@property(nonatomic,strong) UIImageView *rightBgImage;
///
@property (nonatomic,strong) NetImageView *leftBubbleImageView;
///
@property (nonatomic,strong) NetImageView *rightBubbleImageView;
@end
@implementation MessageContentHeadLinesText
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self addSubview:self.leftAvatar];
[self addSubview:self.headWearImageView];
[self addSubview:self.rightAvatar];
[self addSubview:self.rightHeadWearImageView];
[self addSubview:self.leftNameView];
[self addSubview:self.leftBgImage];
[self addSubview:self.rightBgImage];
[self addSubview:self.leftBubbleImageView];
[self addSubview:self.rightBubbleImageView];
[self.leftBgImage addSubview:self.messageText];
[self.rightBgImage addSubview:self.rightMessageText];
[self.leftAvatar mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(15));
make.width.height.mas_equalTo(kGetScaleWidth(48));
make.top.mas_equalTo(kGetScaleWidth(10));
}];
[self.headWearImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.leftAvatar).with.insets(UIEdgeInsetsMake(-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10)));
}];
[self.leftNameView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(21));
make.height.mas_equalTo(kGetScaleWidth(14));
make.leading.mas_equalTo(kGetScaleWidth(71.5));
make.width.mas_lessThanOrEqualTo(kGetScaleWidth(240));
}];
[self.rightAvatar mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.width.height.equalTo(self.leftAvatar);
make.trailing.mas_equalTo(-kGetScaleWidth(15));
}];
[self.rightHeadWearImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.rightAvatar).with.insets(UIEdgeInsetsMake(-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10),-kGetScaleWidth(10)));
}];
[self.leftBgImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(72));
make.width.mas_equalTo(kGetScaleWidth(52));
make.height.mas_equalTo(kGetScaleWidth(36));
make.top.mas_equalTo(kGetScaleWidth(45));
}];
[self.rightBgImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-kGetScaleWidth(72));
make.top.mas_equalTo(kGetScaleWidth(21));
make.width.mas_equalTo(kGetScaleWidth(52));
make.height.mas_greaterThanOrEqualTo(kGetScaleWidth(36));
}];
[self.leftBubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.leftBgImage);
}];
[self.messageText mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.leftBgImage).with.insets(UIEdgeInsetsMake(kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10)));
}];
[self.rightBubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.rightBgImage);
}];
[self.rightMessageText mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.rightBgImage).with.insets(UIEdgeInsetsMake(kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10),kGetScaleWidth(10)));
}];
self.leftAvatar.hidden = YES;
self.leftNameView.hidden = YES;
self.leftBgImage.hidden = YES;
self.headWearImageView.hidden = YES;
self.messageText.hidden = YES;
self.leftBubbleImageView.hidden = YES;
self.rightAvatar.hidden = YES;
self.rightBgImage.hidden = YES;
self.rightHeadWearImageView.hidden = YES;
self.rightBubbleImageView.hidden = YES;
self.rightMessageText.hidden = YES;
}
return self;
}
- (void)render:(nonnull MessageBaseModel *)model {
self.message = model.message;
MessageHeadlinesTextModel * textModel = (MessageHeadlinesTextModel *)model;
XPMessageRemoteExtModel *extModel = textModel.extModel;
if(extModel == nil)return;
self.leftAvatar.hidden = YES;
self.leftNameView.hidden = YES;
self.leftBgImage.hidden = YES;
self.headWearImageView.hidden = YES;
self.messageText.hidden = YES;
self.leftBubbleImageView.hidden = YES;
self.rightAvatar.hidden = YES;
self.rightBgImage.hidden = YES;
self.rightHeadWearImageView.hidden = YES;
self.rightBubbleImageView.hidden = YES;
self.rightMessageText.hidden = YES;
if(textModel.isSelf){
[self.rightBgImage mas_remakeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-kGetScaleWidth(72));
make.top.mas_equalTo(kGetScaleWidth(21));
make.width.mas_equalTo(textModel.width);
make.height.mas_equalTo(textModel.imageHeight);
}];
self.rightAvatar.hidden = NO;
self.rightBgImage.hidden = NO;
self.rightHeadWearImageView.hidden = NO;
self.rightBubbleImageView.hidden = NO;
self.rightMessageText.hidden = NO;
self.rightAvatar.image = nil;
[self.rightAvatar loadImageWithUrl:extModel.avatar completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.rightAvatar.image = image;
}];
self.rightMessageText.attributedText = textModel.textAttribute;
self.rightBubbleImageView.image = nil;
self.rightBgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_right")];
[self.rightBubbleImageView loadImageWithUrl:extModel.iosBubbleUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.rightBgImage.image = nil;
UIImage *image1 = [UIImage imageWithCGImage:image.CGImage scale:2.0 orientation:UIImageOrientationUp];
self.rightBubbleImageView.image = [self resizableImage:image1];
}];
NSString *headwearUrl = extModel.headwearUrl;
self.rightHeadWearImageView.image = nil;
if (headwearUrl.length > 0) {
NSURL *url = [NSURL URLWithString:headwearUrl];
@kWeakify(self);
[self.manager loadSpriteSheetImageWithURL:url completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
@kStrongify(self);
self.rightHeadWearImageView.image = sprit;
} failureBlock:^(NSError * _Nullable error) {
}];
}
return;
}
[self.leftBgImage mas_remakeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(72));
make.width.mas_equalTo(textModel.width);
make.height.mas_equalTo(textModel.imageHeight);
make.top.mas_equalTo(kGetScaleWidth(45));
}];
NSString *headwearUrl = extModel.headwearUrl;
self.headWearImageView.image = nil;
if (headwearUrl.length > 0) {
NSURL *url = [NSURL URLWithString:headwearUrl];
@kWeakify(self);
[self.manager loadSpriteSheetImageWithURL:url completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
@kStrongify(self);
self.headWearImageView.image = sprit;
} failureBlock:^(NSError * _Nullable error) {
}];
}
self.leftAvatar.hidden = NO;
self.leftNameView.hidden = NO;
self.leftBgImage.hidden = NO;
self.headWearImageView.hidden = NO;
self.messageText.hidden = NO;
self.leftBubbleImageView.hidden = NO;
self.leftAvatar.image = nil;
[self.leftAvatar loadImageWithUrl:extModel.avatar completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.leftAvatar.image = image;
}];
self.leftBgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_left")];
self.messageText.textColor = [UIColor whiteColor];
self.leftBubbleImageView.image = nil;
[self.leftBubbleImageView loadImageWithUrl:extModel.iosBubbleUrl completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.leftBgImage.image = nil;
self.messageText.textColor = UIColorFromRGB(0x333333);
UIImage *image1 = [UIImage imageWithCGImage:image.CGImage scale:2.0 orientation:UIImageOrientationUp];
self.leftBubbleImageView.image = [self resizableImage:image1];
}];
self.leftNameView.attributedText = textModel.nameAtt;
self.messageText.attributedText = textModel.textAttribute;
}
- (UIImage*)resizableImage:(UIImage *)image {
//
CGFloat top = (image.size.height - 1) / 2;
CGFloat left = (image.size.width - 1) / 2;
CGFloat right = (image.size.width - 1) / 2;
CGFloat bottom = (image.size.height - 1) / 2;
return [image resizableImageWithCapInsets:UIEdgeInsetsMake(top, left, bottom, right) resizingMode:UIImageResizingModeStretch];
}
- (NetImageView *)leftAvatar{
if(!_leftAvatar){
NetImageConfig *config = [NetImageConfig new];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_leftAvatar = [[NetImageView alloc]initWithConfig:config];
_leftAvatar.layer.cornerRadius = kGetScaleWidth(48)/2;
_leftAvatar.layer.masksToBounds = YES;
}
return _leftAvatar;
}
- (NetImageView *)rightAvatar{
if(!_rightAvatar){
NetImageConfig *config = [NetImageConfig new];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_rightAvatar = [[NetImageView alloc]initWithConfig:config];
_rightAvatar.layer.cornerRadius = kGetScaleWidth(48)/2;
_rightAvatar.layer.masksToBounds = YES;
}
return _rightAvatar;
}
- (YYLabel *)leftNameView{
if(!_leftNameView){
_leftNameView = [YYLabel new];
}
return _leftNameView;
}
- (UIImageView *)leftBgImage{
if(!_leftBgImage){
_leftBgImage = [UIImageView new];
_leftBgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_left")];
}
return _leftBgImage;
}
- (UIImageView *)rightBgImage{
if(!_rightBgImage){
_rightBgImage = [UIImageView new];
_rightBgImage.image = [self resizableImage:kImage(@"ms_message_headlines_text_right")];
}
return _rightBgImage;
}
- (NetImageView *)leftBubbleImageView{
if(!_leftBubbleImageView){
_leftBubbleImageView = [[NetImageView alloc] init];
}
return _leftBubbleImageView;
}
- (NetImageView *)rightBubbleImageView{
if(!_rightBubbleImageView){
_rightBubbleImageView = [[NetImageView alloc] init];
}
return _rightBubbleImageView;
}
- (YYLabel *)messageText {
if (!_messageText) {
_messageText = [[YYLabel alloc]initWithFrame:CGRectZero];
_messageText.preferredMaxLayoutWidth = kGetScaleWidth(240);
_messageText.textColor = DJDKMIMOMColor.mainTextColor;
_messageText.numberOfLines = 0;
_messageText.font = kFontMedium(14);
_messageText.textColor = [UIColor whiteColor];
_messageText.textAlignment = NSTextAlignmentLeft;
_messageText.userInteractionEnabled = YES;
}
return _messageText;
}
- (YYLabel *)rightMessageText{
if(!_rightMessageText){
_rightMessageText = [[YYLabel alloc]initWithFrame:CGRectZero];
_rightMessageText.preferredMaxLayoutWidth = kGetScaleWidth(240);
_rightMessageText.textColor = DJDKMIMOMColor.mainTextColor;
_rightMessageText.numberOfLines = 0;
_rightMessageText.font = kFontMedium(14);
_rightMessageText.textColor = UIColorFromRGB(0x333333);
_rightMessageText.textAlignment = NSTextAlignmentLeft;
_rightMessageText.userInteractionEnabled = YES;
}
return _rightMessageText;
}
- (YYAnimatedImageView *)headWearImageView {
if (!_headWearImageView) {
_headWearImageView = [[YYAnimatedImageView alloc] init];
_headWearImageView.backgroundColor = [UIColor clearColor];
_headWearImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _headWearImageView;
}
- (YYAnimatedImageView *)rightHeadWearImageView {
if (!_rightHeadWearImageView) {
_rightHeadWearImageView = [[YYAnimatedImageView alloc] init];
_rightHeadWearImageView.backgroundColor = [UIColor clearColor];
_rightHeadWearImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _rightHeadWearImageView;
}
- (SpriteSheetImageManager *)manager {
if (!_manager) {
_manager = [[SpriteSheetImageManager alloc] init];
}
return _manager;
}
@end

View File

@@ -10,7 +10,6 @@
NS_ASSUME_NONNULL_BEGIN
@interface MSSessionPublicChatHalImageModel : MessageBaseModel
@property(nonatomic,strong) NSMutableAttributedString *nameAtt;
@property(nonatomic,assign) BOOL isSelf ;
@property(nonatomic,strong) XPMessageRemoteExtModel *extModel;
@property (nonatomic,strong) UIImage *image;

View File

@@ -15,17 +15,6 @@
XPMessageRemoteExtModel *extModel = [XPMessageRemoteExtModel modelWithJSON:message.remoteExt[message.from]];
self.extModel = extModel;
self.isSelf = [[NIMSDK sharedSDK].loginManager.currentAccount isEqualToString:message.from];
NSString *name = extModel.nick.length > 6 ? [NSString stringWithFormat:@"%@...",[extModel.nick substringToIndex:6]] : extModel.nick;
self.nameAtt = [self createTextAttribute:name color:UIColorFromRGB(0x333333) font:kFontBold(14)];
[self.nameAtt appendAttributedString:[self createSapceAttribute:2]];
if (extModel.experUrl) {
[self.nameAtt appendAttributedString:[self createUrlImageAttribute:extModel.experUrl size:CGSizeMake(kGetScaleWidth(36), kGetScaleWidth(18))]];
[self.nameAtt appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.charmUrl) {
[self.nameAtt appendAttributedString:[self createUrlImageAttribute:extModel.charmUrl size:CGSizeMake(kGetScaleWidth(36), kGetScaleWidth(18))]];
[self.nameAtt appendAttributedString:[self createSapceAttribute:2]];
}
NIMImageObject * imageObject = (NIMImageObject*)message.messageObject;
CGFloat attachmentImageMinWidth = (MESSAGE_IMAGE_Min_SIZE);
CGFloat attachmentImageMinHeight = (MESSAGE_IMAGE_Min_SIZE);

View File

@@ -12,7 +12,6 @@ NS_ASSUME_NONNULL_BEGIN
@interface MessageHeadlinesTextModel : MessageBaseModel
///富文本
@property (nonatomic,strong) NSAttributedString *textAttribute;
@property(nonatomic,strong) NSMutableAttributedString *nameAtt;
@property(nonatomic,assign) BOOL isSelf ;
@property(nonatomic,strong) XPMessageRemoteExtModel *extModel;
@property(nonatomic,assign) CGFloat width;

View File

@@ -15,27 +15,11 @@
XPMessageRemoteExtModel *extModel = [XPMessageRemoteExtModel modelWithJSON:message.remoteExt[message.from]];
self.extModel = extModel;
self.isSelf = [[NIMSDK sharedSDK].loginManager.currentAccount isEqualToString:message.from];
NSString *name = extModel.nick.length > 6 ? [NSString stringWithFormat:@"%@...",[extModel.nick substringToIndex:6]] : extModel.nick;
self.nameAtt = [self createTextAttribute:name color:UIColorFromRGB(0x333333) font:kFontBold(14)];
[self.nameAtt appendAttributedString:[self createSapceAttribute:2]];
if (extModel.experUrl) {
[self.nameAtt appendAttributedString:[self createUrlImageAttribute:extModel.experUrl size:CGSizeMake(kGetScaleWidth(36), kGetScaleWidth(18))]];
[self.nameAtt appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.charmUrl) {
[self.nameAtt appendAttributedString:[self createUrlImageAttribute:extModel.charmUrl size:CGSizeMake(kGetScaleWidth(36), kGetScaleWidth(18))]];
[self.nameAtt appendAttributedString:[self createSapceAttribute:2]];
}
NSString * messageText = message.text;
if (!messageText) {
messageText = YMLocalizedString(@"MessageTextModel0");
}
CGFloat width = [UILabel getWidthWithText:messageText height:kGetScaleWidth(36) font:kFontMedium(14)];
width = width > kGetScaleWidth(200) ? kGetScaleWidth(200) : width;

View File

@@ -30,6 +30,7 @@
#import "XPMessageRemoteExtModel.h"
#import "MSSessionPublicChatHalImageModel.h"
#import "MSSessionPublicChatHalImageCell.h"
#import "MSSessionPublicChatHalRightTextCell.h"
///View
#import "MSSessionPublicChatHalTextCell.h"
#import "MessageCell.h"
@@ -53,6 +54,7 @@
#import "XPCandyTreeInsufficientBalanceView.h"
#import "XPIAPRechargeViewController.h"
#import "Api+Mine.h"
#import "MSSessionPublicChatHalIRightmageCell.h"
@interface MSSessionPublicChatHallVC ()<SessionNavViewDelegate,MessageProtocol, UITableViewDelegate, UITableViewDataSource, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMMediaManagerDelegate, MessageCellDelegate, TZImagePickerControllerDelegate, SessionNavViewDelegate, QInputBarViewDelegate, QInputBarViewDataSource,InputBoardDataSource ,InputBoardDelegate , QEmotionBoardViewDelegate, QinputPhotoViewDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate,MSSessionReleaseHeadlinesViewDelegate,XPCandyTreeInsufficientBalanceViewDelegate>
@property (nonatomic, strong) NIMSession * session;
@property (nonatomic, strong) NSMutableArray<MessageBaseModel *> * messages;
@@ -523,13 +525,26 @@
- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
MessageBaseModel * message = [self.messages safeObjectAtIndex1:indexPath.row];
MessageBaseModel * message = [self.messages safeObjectAtIndex1:indexPath.row];
MessageHeadlinesTextModel * textModel = (MessageHeadlinesTextModel *)message;
if(message.messageType == SessionMessageType_Text){
if(textModel.isSelf){
MSSessionPublicChatHalRightTextCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MSSessionPublicChatHalRightTextCell class]) forIndexPath:indexPath];
[cell render:message];
return cell;
}
MSSessionPublicChatHalTextCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MSSessionPublicChatHalTextCell class]) forIndexPath:indexPath];
[cell render:message];
return cell;
}else if (message.messageType == SessionMessageType_Image){
if(textModel.isSelf){
MSSessionPublicChatHalIRightmageCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MSSessionPublicChatHalIRightmageCell class]) forIndexPath:indexPath];
[cell render:message];
return cell;
}
MSSessionPublicChatHalImageCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MSSessionPublicChatHalImageCell class]) forIndexPath:indexPath];
[cell render:message];
return cell;
@@ -550,10 +565,7 @@
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
MessageBaseModel *msg = [self.messages safeObjectAtIndex1:indexPath.row];
return msg.height;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
MessageBaseModel *m = [self.messages safeObjectAtIndex1:indexPath.row];
NSLog(@"%@",m.message.remoteExt);
@@ -999,6 +1011,8 @@
_sessionTableView.showsVerticalScrollIndicator = NO;
[_sessionTableView registerClass:[MSSessionPublicChatHalTextCell class] forCellReuseIdentifier:NSStringFromClass([MSSessionPublicChatHalTextCell class])];
[_sessionTableView registerClass:[MSSessionPublicChatHalImageCell class] forCellReuseIdentifier:NSStringFromClass([MSSessionPublicChatHalImageCell class])];
[_sessionTableView registerClass:[MSSessionPublicChatHalRightTextCell class] forCellReuseIdentifier:NSStringFromClass([MSSessionPublicChatHalRightTextCell class])];
[_sessionTableView registerClass:[MSSessionPublicChatHalIRightmageCell class] forCellReuseIdentifier:NSStringFromClass([MSSessionPublicChatHalIRightmageCell class])];
if (@available(iOS 11.0, *)) {

View File

@@ -33,17 +33,12 @@
_bgImageView.hidden = !self.info.isReturnProfit;
}
-(void)installConstraints{
CGFloat width = 43;
if (isMSEN()){
width = 40;
}else if (isMSRTL()){
width = 54;
}
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(width));
make.width.mas_equalTo(kGetScaleWidth(16));
make.height.mas_equalTo(kGetScaleWidth(16));
make.top.mas_equalTo(0);
make.trailing.mas_equalTo(10);
make.trailing.mas_equalTo(0);
}];
}
@@ -52,7 +47,7 @@
- (UIImageView *)bgImageView{
if(!_bgImageView){
_bgImageView = [UIImageView new];
_bgImageView.image = [[UIImage getLanguageImage:@"mine_noble_center_tag_title_bg"] ms_SetImageForRTL];
_bgImageView.image = kImage(@"mine_noble_center_tag_title_bg_ar");
_bgImageView.hidden = YES;
}
return _bgImageView;

View File

@@ -240,7 +240,7 @@
[self.stackView addArrangedSubview:self.arrangeMicButton];
[self.stackView addArrangedSubview:self.messageButton];
[self.stackView addArrangedSubview:self.moreButton];
[self.stackView addArrangedSubview:self.nobleButton];
// [self.stackView addArrangedSubview:self.nobleButton];
self.backgroundColor = UIColorRGBAlpha(0xFFFFFF, 0.15);
CAShapeLayer * layer = [CAShapeLayer layer];

View File

@@ -11,17 +11,17 @@ NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, RoomMoreMenuType) {
///礼物值关闭
RoomMoreMenuType_Gift_Value_Close = 1,
///礼物值开启
RoomMoreMenuType_Gift_Value_Open = 2,
// RoomMoreMenuType_Gift_Value_Close = 1,
// ///礼物值开启
// RoomMoreMenuType_Gift_Value_Open = 2,
///公屏关闭
RoomMoreMenuType_Message_Screen_Close = 3,
///公屏开启
RoomMoreMenuType_Message_Screen_Open = 4,
///我的礼物特效关闭
RoomMoreMenuType_Gift_Effect_Close = 5,
///我的礼物特效开启
RoomMoreMenuType_Gift_Effect_Open = 6,
// RoomMoreMenuType_Message_Screen_Close = 3,
// ///公屏开启
// RoomMoreMenuType_Message_Screen_Open = 4,
// ///我的礼物特效关闭
// RoomMoreMenuType_Gift_Effect_Close = 5,
// ///我的礼物特效开启
// RoomMoreMenuType_Gift_Effect_Open = 6,
///房间设置
RoomMoreMenuType_Room_Setting = 7,
///邀请粉丝

View File

@@ -32,17 +32,17 @@
roomPK.type = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? RoomMoreMenuType_Room_PK_Close : RoomMoreMenuType_Room_PK_Open;
roomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * giftValue = [[XPRoomMoreItemModel alloc] init];
giftValue.title = roomInfo.showGiftValue ? YMLocalizedString(@"XPMoreMenuPresenter27") : YMLocalizedString(@"XPMoreMenuPresenter3");
giftValue.imageName= @"room_more_menu_gift_value";
giftValue.type = roomInfo.showGiftValue ? RoomMoreMenuType_Gift_Value_Close : RoomMoreMenuType_Gift_Value_Open;
giftValue.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
// XPRoomMoreItemModel * giftValue = [[XPRoomMoreItemModel alloc] init];
// giftValue.title = roomInfo.showGiftValue ? YMLocalizedString(@"XPMoreMenuPresenter27") : YMLocalizedString(@"XPMoreMenuPresenter3");
// giftValue.imageName= @"room_more_menu_gift_value";
// giftValue.type = roomInfo.showGiftValue ? RoomMoreMenuType_Gift_Value_Close : RoomMoreMenuType_Gift_Value_Open;
// giftValue.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * giftEffect = [[XPRoomMoreItemModel alloc] init];
giftEffect.title = roomInfo.hasAnimationEffect ? YMLocalizedString(@"XPMoreMenuPresenter28") : YMLocalizedString(@"XPMoreMenuPresenter5");
giftEffect.imageName = @"room_more_menu_gift_effect";
giftEffect.type = roomInfo.hasAnimationEffect ? RoomMoreMenuType_Gift_Effect_Close : RoomMoreMenuType_Gift_Effect_Open;
giftEffect.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
// XPRoomMoreItemModel * giftEffect = [[XPRoomMoreItemModel alloc] init];
// giftEffect.title = roomInfo.hasAnimationEffect ? YMLocalizedString(@"XPMoreMenuPresenter28") : YMLocalizedString(@"XPMoreMenuPresenter5");
// giftEffect.imageName = @"room_more_menu_gift_effect";
// giftEffect.type = roomInfo.hasAnimationEffect ? RoomMoreMenuType_Gift_Effect_Close : RoomMoreMenuType_Gift_Effect_Open;
// giftEffect.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * wishGift = [[XPRoomMoreItemModel alloc] init];
wishGift.title = YMLocalizedString(@"XPMoreMenuPresenter6");
@@ -81,11 +81,11 @@
if (roomInfo.pkMatchStartTime) {
anchorRoomPK.title = YMLocalizedString(@"XPMoreMenuPresenter17");
}
XPRoomMoreItemModel * messageScreen = [[XPRoomMoreItemModel alloc] init];
messageScreen.title = roomInfo.isCloseScreen ? YMLocalizedString(@"XPMoreMenuPresenter34") : YMLocalizedString(@"XPMoreMenuPresenter19");
messageScreen.imageName = @"room_more_menu_message";
messageScreen.type = roomInfo.isCloseScreen ? RoomMoreMenuType_Message_Screen_Open : RoomMoreMenuType_Message_Screen_Close;
messageScreen.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
// XPRoomMoreItemModel * messageScreen = [[XPRoomMoreItemModel alloc] init];
// messageScreen.title = roomInfo.isCloseScreen ? YMLocalizedString(@"XPMoreMenuPresenter34") : YMLocalizedString(@"XPMoreMenuPresenter19");
// messageScreen.imageName = @"room_more_menu_message";
// messageScreen.type = roomInfo.isCloseScreen ? RoomMoreMenuType_Message_Screen_Open : RoomMoreMenuType_Message_Screen_Close;
// messageScreen.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * clearScreen = [[XPRoomMoreItemModel alloc] init];
clearScreen.title = YMLocalizedString(@"XPMoreMenuPresenter20");
@@ -179,18 +179,15 @@
// if (isCreator && roomInfo.type != RoomType_Anchor && roomInfo.isPermitRoom != PermitRoomType_Licnese && roomInfo.isPermitRoom != PermitRoomType_YoungerStar) {
// [array addObject:releaseRadio];
// }
[array addObject:giftEffect];
[array addObject:roomSetting];
[array addObject:messageScreen];
[array addObject:clearScreen];
[array addObject:giftValue];
} else {
[array addObject:trumpet];
[array addObject:giftEffect];
}
} else {
[array addObject:giftEffect];
}

View File

@@ -248,53 +248,53 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
NSString * roomUid = [NSString stringWithFormat:@"%ld",self.roomInfo.uid];
NSString * roomId = [NSString stringWithFormat:@"%ld", self.roomInfo.roomId];
switch (item.type) {
case RoomMoreMenuType_Gift_Value_Close:
{
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeGiftValue"}];
if (self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController2")];
return;
}
TTAlertConfig * config = [[TTAlertConfig alloc] init];
config.title = @"";
config.message = YMLocalizedString(@"XPRoomMoreMenuViewController3");
[TTPopup alertWithConfig:config confirmHandler:^{
[self.presenter closeRoomGiftValue:roomUid];
} cancelHandler:^{
}];
}
break;
case RoomMoreMenuType_Gift_Value_Open:
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openGiftValue"}];
[self.presenter openRoomGiftValue:roomUid];
break;
case RoomMoreMenuType_Message_Screen_Open:
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openScreen"}];
[self.presenter updateRoomMessageScreenState:NO roomId:roomId];
break;
case RoomMoreMenuType_Message_Screen_Close:
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeScreen"}];
[self.presenter updateRoomMessageScreenState:YES roomId:roomId];
break;
case RoomMoreMenuType_Gift_Effect_Open:
{
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openGiftEffect"}];
[self showSuccessToast:YMLocalizedString(@"XPRoomMoreMenuViewController4")];
NSDictionary * dic = @{@"hasAnimationEffect": @(1)};
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomGiftEffectUpdateNotificationKey object:dic];
[self dismissViewControllerAnimated:YES completion:nil];
}
break;
case RoomMoreMenuType_Gift_Effect_Close:
{
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeGiftEffect"}];
[self showSuccessToast:YMLocalizedString(@"XPRoomMoreMenuViewController5")];
NSDictionary * dic = @{@"hasAnimationEffect": @(0)};
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomGiftEffectUpdateNotificationKey object:dic];
[self dismissViewControllerAnimated:YES completion:nil];
}
break;
// case RoomMoreMenuType_Gift_Value_Close:
// {
// [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeGiftValue"}];
// if (self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
// [self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController2")];
// return;
// }
// TTAlertConfig * config = [[TTAlertConfig alloc] init];
// config.title = @"";
// config.message = YMLocalizedString(@"XPRoomMoreMenuViewController3");
// [TTPopup alertWithConfig:config confirmHandler:^{
// [self.presenter closeRoomGiftValue:roomUid];
// } cancelHandler:^{
//
// }];
// }
// break;
// case RoomMoreMenuType_Gift_Value_Open:
// [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openGiftValue"}];
// [self.presenter openRoomGiftValue:roomUid];
// break;
// case RoomMoreMenuType_Message_Screen_Open:
// [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openScreen"}];
// [self.presenter updateRoomMessageScreenState:NO roomId:roomId];
// break;
// case RoomMoreMenuType_Message_Screen_Close:
// [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeScreen"}];
// [self.presenter updateRoomMessageScreenState:YES roomId:roomId];
// break;
// case RoomMoreMenuType_Gift_Effect_Open:
// {
// [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openGiftEffect"}];
// [self showSuccessToast:YMLocalizedString(@"XPRoomMoreMenuViewController4")];
// NSDictionary * dic = @{@"hasAnimationEffect": @(1)};
// [[NSNotificationCenter defaultCenter] postNotificationName:kRoomGiftEffectUpdateNotificationKey object:dic];
// [self dismissViewControllerAnimated:YES completion:nil];
// }
// break;
// case RoomMoreMenuType_Gift_Effect_Close:
// {
// [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeGiftEffect"}];
// [self showSuccessToast:YMLocalizedString(@"XPRoomMoreMenuViewController5")];
// NSDictionary * dic = @{@"hasAnimationEffect": @(0)};
// [[NSNotificationCenter defaultCenter] postNotificationName:kRoomGiftEffectUpdateNotificationKey object:dic];
// [self dismissViewControllerAnimated:YES completion:nil];
// }
// break;
case RoomMoreMenuType_Invite_Fans:
{
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"inviteFans"}];

View File

@@ -72,6 +72,16 @@ NS_ASSUME_NONNULL_BEGIN
/// @param completion 完成
/// @param roomUid roomUid
+(void)requestRoomOnlineUserList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid;
/// 关闭房间礼物值
/// @param completion 完成
/// @param uid 操作人的uid
/// @param roomUid 房主的uid
+ (void)closeRoomGiftValue:(HttpRequestHelperCompletion)completion uid:(NSString *)uid roomUid:(NSString *)roomUid;
/// 开启房间礼物值
/// @param completion 完成
/// @param uid 操作人的uid
/// @param roomUid 房主的uid
+ (void)openRoomGiftValue:(HttpRequestHelperCompletion)completion uid:(NSString *)uid roomUid:(NSString *)roomUid;
@end
NS_ASSUME_NONNULL_END

View File

@@ -103,4 +103,20 @@
+(void)requestRoomOnlineUserList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid{
[self makeRequest:@"room/v2/online" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, roomUid, nil];
}
///
/// @param completion
/// @param uid uid
/// @param roomUid uid
+ (void)closeRoomGiftValue:(HttpRequestHelperCompletion)completion uid:(NSString *)uid roomUid:(NSString *)roomUid {
NSString * fang = [NSString stringFromBase64String:@"cm9vbS9naWZ0L3ZhbHVlL2Nsb3Nl"];///room/gift/value/close
[self makeRequest:fang method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, roomUid, nil];
}
///
/// @param completion
/// @param uid uid
/// @param roomUid uid
+ (void)openRoomGiftValue:(HttpRequestHelperCompletion)completion uid:(NSString *)uid roomUid:(NSString *)roomUid {
NSString * fang = [NSString stringFromBase64String:@"cm9vbS9naWZ0L3ZhbHVlL29wZW4="];///room/gift/value/open
[self makeRequest:fang method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, roomUid, nil];
}
@end

View File

@@ -30,8 +30,10 @@ typedef NS_ENUM(NSInteger, RoomSettingItemType) {
RoomSettingItemType_Message_Screen,
///排麦
RoomSettingItemType_Arrange_Mic,
///排麦
///离开模式
RoomSettingItemType_Leave_Model,
///关闭礼物值
RoomSettingItemType_Gift_Value_Model,
};
@interface XPRoomSettingItemModel : PIBaseModel

View File

@@ -61,6 +61,14 @@ NS_ASSUME_NONNULL_BEGIN
/// 获取房间在线用户
/// @param roomUid roomUid
-(void)getRoomOnlineUserListWithRoomUid:(NSString *)roomUid;
/// 关闭房间礼物值
/// @param roomUid 房间的uid
- (void)closeRoomGiftValue:(NSString *)roomUid itemModel:(XPRoomSettingItemModel *)itemModel;
/// 开启房间礼物值
/// @param roomUid 房间的uid
- (void)openRoomGiftValue:(NSString *)roomUid itemModel:(XPRoomSettingItemModel *)itemModel;
@end
NS_ASSUME_NONNULL_END

View File

@@ -76,6 +76,13 @@
leaveItem.title = YMLocalizedString(@"XPRoomSettingPresenter9");
leaveItem.switchState = roomInfo.leaveMode;
leaveItem.type = RoomSettingItemType_Leave_Model;
XPRoomSettingItemModel * giftValueItem = [[XPRoomSettingItemModel alloc] init];
giftValueItem.title = roomInfo.showGiftValue ? YMLocalizedString(@"XPMoreMenuPresenter27") : YMLocalizedString(@"XPMoreMenuPresenter3");
giftValueItem.switchState = roomInfo.showGiftValue;
giftValueItem.type = RoomSettingItemType_Gift_Value_Model;
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
NSString * uid = [AccountInfoStorage instance].getUid;
@@ -210,14 +217,16 @@
}
}
}
if(![ClientConfig shareConfig].canOpen) {
array = @[
@[messageScreedItem, titleItem],
@[lockItem],
@[managerItem, blackItem]
];
}
[[self getView] getRoomSettingListSuccess:array];
NSMutableArray *list = [[NSMutableArray alloc]initWithArray:array];
if(member.type == NIMChatroomMemberTypeManager || member.type == NIMChatroomMemberTypeCreator || isSuperAdmin){
NSMutableArray *subList = [[NSMutableArray alloc]initWithArray:[list safeObjectAtIndex1:2]?:@[]];
if(subList){
[subList addObject:giftValueItem];
}
list[2] = subList;
}
[[self getView] getRoomSettingListSuccess:list];
}
}];
}
@@ -359,4 +368,25 @@
}] roomUid:roomUid];
}
///
/// @param roomUid uid
- (void)closeRoomGiftValue:(NSString *)roomUid itemModel:(XPRoomSettingItemModel *)itemModel{
NSString * uid = [AccountInfoStorage instance].getUid;
[Api closeRoomGiftValue:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] closeRoomGiftValueSuccessWithItemModel:itemModel];
}fail:^(NSInteger code, NSString * _Nullable msg) {
[[self getView] closeRoomGiftValueFailWithItemModel:itemModel];
}] uid:uid roomUid:roomUid];
}
///
/// @param roomUid uid
- (void)openRoomGiftValue:(NSString *)roomUid itemModel:(XPRoomSettingItemModel *)itemModel{
NSString * uid = [AccountInfoStorage instance].getUid;
[Api openRoomGiftValue:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] openRoomGiftValueSuccessWithItemModel:itemModel];
}fail:^(NSInteger code, NSString * _Nullable msg) {
[[self getView] openRoomGiftValueFailWithItemModel:itemModel];
}] uid:uid roomUid:roomUid];
}
@end

View File

@@ -32,6 +32,11 @@ NS_ASSUME_NONNULL_BEGIN
- (void)updateRoomInfoFail:(NSString *)message;
//获取房间在线用户成功
-(void)getRoomOnlineUserListSuccess:(NSArray *)list;
-(void)closeRoomGiftValueSuccessWithItemModel:(XPRoomSettingItemModel *)itemModel;
-(void)closeRoomGiftValueFailWithItemModel:(XPRoomSettingItemModel *)itemModel;
-(void)openRoomGiftValueSuccessWithItemModel:(XPRoomSettingItemModel *)itemModel;
-(void)openRoomGiftValueFailWithItemModel:(XPRoomSettingItemModel *)itemModel;
@end
NS_ASSUME_NONNULL_END

View File

@@ -269,6 +269,7 @@ XPRoomSettingItemModel * itemModel = [[self.datasource safeObjectAtIndex1:indexP
[self.navigationController pushViewController:managerVC animated:YES];
}
break;
default:
break;
}
@@ -317,6 +318,7 @@ XPRoomSettingItemModel * itemModel = [[self.datasource safeObjectAtIndex1:indexP
[self.presenter closeRoomArrangeMic:roomUid];
}
} cancelHandler:^{
[switchView setOn:!switchView.isOn];
}];
}
@@ -335,6 +337,7 @@ XPRoomSettingItemModel * itemModel = [[self.datasource safeObjectAtIndex1:indexP
[TTPopup alertWithConfig:config confirmHandler:^{
[self handleRoomLeaveMode];
} cancelHandler:^{
[switchView setOn:!switchView.isOn];
}];
}
break;
@@ -368,7 +371,7 @@ XPRoomSettingItemModel * itemModel = [[self.datasource safeObjectAtIndex1:indexP
NSString * mgId = [NSString stringWithFormat:@"%lld", self.roomInfo.mgId];
[self.presenter updateRoomInfo:self.roomInfo.title roomPwd:self.roomInfo.roomPwd tagId:roomTag classifyId:roomClassifyId hasAnimationEffect:NO roomUid:roomUid roomId:roomId type:self.roomInfo.type itemType:itemModel.type mgId:mgId];
} cancelHandler:^{
[switchView setOn:!switchView.isOn];
}];
}
break;
@@ -385,16 +388,58 @@ XPRoomSettingItemModel * itemModel = [[self.datasource safeObjectAtIndex1:indexP
[TTPopup alertWithConfig:config confirmHandler:^{
[self.presenter updateRoomMessageScreenState:YES roomId:roomId];
} cancelHandler:^{
[switchView setOn:!switchView.isOn];
}];
}
break;
case RoomSettingItemType_Gift_Value_Model:
{
if (self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController2")];
return;
}
if(isOn){
[self.presenter openRoomGiftValue:roomUid itemModel:itemModel];
return;
}
TTAlertConfig * config = [[TTAlertConfig alloc] init];
config.title = @"";
config.message = YMLocalizedString(@"XPRoomMoreMenuViewController3");
[TTPopup alertWithConfig:config confirmHandler:^{
[self.presenter closeRoomGiftValue:roomUid itemModel:itemModel];
} cancelHandler:^{
[switchView setOn:!switchView.isOn];
}];
break;
}
default:
break;
}
}
#pragma mark - XPRoomSettingProtocol
-(void)closeRoomGiftValueSuccessWithItemModel:(XPRoomSettingItemModel *)itemModel{
itemModel.switchState = !itemModel.switchState;
[self.tableView reloadData];
[self showSuccessToast:YMLocalizedString(@"XPRoomMoreMenuViewController1")];
}
-(void)closeRoomGiftValueFailWithItemModel:(XPRoomSettingItemModel *)itemModel{
[self.tableView reloadData];
}
-(void)openRoomGiftValueSuccessWithItemModel:(XPRoomSettingItemModel *)itemModel{
itemModel.switchState = !itemModel.switchState;
[self.tableView reloadData];
[self showSuccessToast:YMLocalizedString(@"XPRoomMoreMenuViewController0")];
}
-(void)openRoomGiftValueFailWithItemModel:(XPRoomSettingItemModel *)itemModel{
[self.tableView reloadData];
}
- (void)getRoomSettingListSuccess:(NSArray *)list {
self.datasource = list;
[self.tableView reloadData];

View File

@@ -36,8 +36,7 @@
@property (nonatomic,strong) UIImageView *micStateImageView;
///
@property (nonatomic,strong) UIStackView *stackView;
///
@property (nonatomic,strong) UILabel *postionLabel;
////
@property (nonatomic,strong) UILabel *nickLabel;
///0
@@ -116,7 +115,7 @@
[self addSubview:self.groupTypeButton];
[self addSubview:self.stackView];
[self.stackView addArrangedSubview:self.postionLabel];
[self.stackView addArrangedSubview:self.nickLabel];
[self.stackView addArrangedSubview:self.sexImageView];
}
@@ -155,9 +154,7 @@
make.width.mas_lessThanOrEqualTo(kGetScaleWidth(88));
}];
[self.postionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(14);
}];
[self.giftValueView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(16);
@@ -414,33 +411,30 @@
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
self.avatarImageView.backgroundColor = [UIColor colorWithPatternImage:newImage];
self.postionLabel.text = [NSString stringWithFormat:@"%d", micState.position + 1];
if (self.roomInfo.type == RoomType_Anchor || (self.roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode && self.roomInfo.roomId > 0) || (self.roomInfo.roomModeType == RoomModeType_Open_Blind && micState.position == 999)) {
self.positionCharmImgView.hidden = YES;
}
self.nickLabel.text = YMLocalizedString(@"MicroView0");
self.nickLabel.text = [NSString stringWithFormat:@"%@%d",YMLocalizedString(@"MicroView0"), micState.position + 1];
}
-(UserInfoModel *)getUser{
return self.userInfo;
}
- (void)configUser:(UserInfoModel *)userInfo {
self.userInfo = userInfo;
if ([ClientConfig shareConfig].canOpen) {
// self.nickLabel.text = YMLocalizedString(@"MicroView0");
self.postionLabel.hidden = NO;
} else {
self.nickLabel.text = YMLocalizedString(@"MicroView1");
self.postionLabel.hidden = YES;
}
self.nickLabel.hidden = NO;
self.sexImageView.hidden = YES;
self.forbidKickView.hidden = YES;
if (userInfo) {
self.avatarImageView.imageUrl = userInfo.avatar;
if (userInfo.gender == GenderType_Male) {
[self.postionLabel setBackgroundColor:[DJDKMIMOMColor positionMaleNickBackColor]];
} else if(userInfo.gender == GenderType_Female){
[self.postionLabel setBackgroundColor:[DJDKMIMOMColor positionFemaleNickBackColor]];
}
NSString *nickStr = userInfo.nick;
self.nickLabel.text = nickStr.length > 0 ? nickStr : @"";
@@ -456,7 +450,8 @@
make.width.mas_lessThanOrEqualTo(kGetScaleWidth(150));
}];
self.sexImageView.hidden = YES;
self.postionLabel.hidden = YES;
[self.sexImageView setTitle:[NSString getAgeWithBirth:userInfo.birth] forState:UIControlStateNormal];
self.sexImageView.backgroundColor = userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
self.sexImageView.titleEdgeInsets = userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
@@ -466,11 +461,11 @@
} else {
self.nickLabel.textColor = [DJDKMIMOMColor positionNickColor];
self.avatarImageView.image = nil;
[self.postionLabel setBackgroundColor:[DJDKMIMOMColor positionNormalNickBackColor]];
if ([ClientConfig shareConfig].canOpen) {
if (self.microModel.microState.position == -1) {
self.nickLabel.hidden = YES;
self.postionLabel.hidden = YES;
}
} else {
self.nickLabel.hidden = YES;
@@ -654,18 +649,7 @@
return _stackView;
}
- (UILabel *)postionLabel {
if (!_postionLabel) {
_postionLabel = [[UILabel alloc] init];
_postionLabel.font = [UIFont systemFontOfSize:10];
_postionLabel.textAlignment = NSTextAlignmentCenter;
_postionLabel.textColor = [UIColor colorWithWhite:1 alpha:1];
_postionLabel.layer.masksToBounds = YES;
_postionLabel.layer.cornerRadius = 7;
[_postionLabel setBackgroundColor:[DJDKMIMOMColor positionNormalNickBackColor]];
}
return _postionLabel;
}
- (UIButton *)sexImageView {
if (!_sexImageView) {

View File

@@ -332,39 +332,46 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)bindCodeSuccess{
[self completeUserInfo];
}
///
///
-(void)requestGiftList{
[self dealWithDefaultSvga];
[self dealWithGiftList];
///
// NSString *time = [NSDate getNowTimeTimestamp];
// NSString *curTime = [NSDate timestampSwitchTime:[time integerValue] andFormatter:@"yyyy-MM-dd"];
// NSDictionary *timeDic = [[NSUserDefaults standardUserDefaults]valueForKey:@"kRequestGiftList"];
// if(timeDic == nil){
// NSMutableDictionary *curDic = [[NSMutableDictionary alloc]initWithDictionary:timeDic];
// [curDic setValue:@(YES) forKey:curTime];
// [[NSUserDefaults standardUserDefaults]setValue:curDic forKey:@"kRequestGiftList"];
// [[NSUserDefaults standardUserDefaults]synchronize];
// }else{
// if(timeDic[curTime]!= nil)return;
// NSMutableDictionary *curDic = [[NSMutableDictionary alloc]initWithDictionary:timeDic];
// [curDic removeAllObjects];
// [curDic setValue:@(YES) forKey:curTime];
// [[NSUserDefaults standardUserDefaults]setValue:curDic forKey:@"kRequestGiftList"];
// [[NSUserDefaults standardUserDefaults]synchronize];
// }
[Api requestCacheGiftDynamicEffectList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){
NSArray *list = data.data;
NSSet *setList = [[NSSet alloc]initWithArray:list];
for (NSString *url in setList) {
NSString *encodingUrl = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
[self cacheGiftDynamicEffectList:encodingUrl];
@kWeakify(self);
[[AFNetworkReachabilityManager sharedManager] startMonitoring];
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
@kStrongify(self);
switch (status) {
case AFNetworkReachabilityStatusUnknown:
break;
case AFNetworkReachabilityStatusNotReachable:
break;
case AFNetworkReachabilityStatusReachableViaWWAN:
case AFNetworkReachabilityStatusReachableViaWiFi:
{
if(self.isFirstReachability == NO){
[self dealWithDefaultSvga];
[self dealWithGiftList];
[Api requestCacheGiftDynamicEffectList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){
self.isFirstReachability = YES;
NSArray *list = data.data;
NSSet *setList = [[NSSet alloc]initWithArray:list];///
for (NSString *url in setList) {
NSString *encodingUrl = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
[self cacheGiftDynamicEffectList:encodingUrl];
}
}
}];
}
}
break;
default:
break;
}
}];
}
-(void)dealWithDefaultSvga{

View File

@@ -1510,9 +1510,9 @@ ineHeadView12" = "الحمل";
"XPRoomPKTimePickerView7" = "0 ثانية";
"XPRoomPKTimePickerView8" = "30 ثانية";
"XPRoomPKSelectUserView0" = "الميكرفون رقم 0";
"XPRoomPKSelectUserView0" = "NO.0";
"XPRoomPKSelectUserView1" = "تأكيد";
"XPRoomPKSelectUserView2" = "الميكرفون رقم %d";
"XPRoomPKSelectUserView2" = "NO.%d";
"XPRoomPKUserView0" = "في انتظار التصعيد";
"XPRoomPKUserView1" = "في انتظار التصعيد";
@@ -1630,7 +1630,7 @@ ineHeadView12" = "الحمل";
"XPUserCardPresenter1" = "موقع المالك";
"XPUserCardPresenter2" = "الموقع رقم %d للملك";
"XPUserCardPresenter3" = "الموقع رقم %d للملكة";
"XPUserCardPresenter4" = "الموقع رقم %d للميك";
"XPUserCardPresenter4" = "NO.%d";
"XPUserCardPresenter6" = "فتح المايك";
"XPUserCardPresenter9" = "إزالة";
"XPUserCardPresenter11" = "إلغاء القفل";
@@ -1856,7 +1856,7 @@ ineHeadView12" = "الحمل";
"MicroGiftValueView0" = "9999 مليون+";
"MicroGiftValueView1" = "%lld مليون";
"MicroView0" = "مكان";
"MicroView0" = "NO.";
"MicroView1" = "موقع";
"MicroView2" = "الفريق الأحمر";
"MicroView3" = "الفريق الأزرق";

View File

@@ -1249,9 +1249,9 @@
"XPRoomPKTimePickerView7" = "0 seconds";
"XPRoomPKTimePickerView8" = "30 seconds";
"XPRoomPKSelectUserView0" = "Mic Slot 0";
"XPRoomPKSelectUserView0" = "NO.0";
"XPRoomPKSelectUserView1" = "Confirm";
"XPRoomPKSelectUserView2" = "Mic Slot %d";
"XPRoomPKSelectUserView2" = "NO.%d";
"XPRoomPKUserView0" = "Waiting to Get on Mic";
"XPRoomPKUserView1" = "Waiting to Get on Mic";
@@ -1370,7 +1370,7 @@
"XPUserCardPresenter1" = "Host";
"XPUserCardPresenter2" = "Male God Slot %d";
"XPUserCardPresenter3" = "Female God Slot %d";
"XPUserCardPresenter4" = "Mic Slot %d";
"XPUserCardPresenter4" = "NO.%d";
"XPUserCardPresenter5" = "Close mic";
"XPUserCardPresenter6" = "Turn on Mic";
"XPUserCardPresenter7" = "Hold he on the mic";
@@ -1596,7 +1596,7 @@
"MicroGiftValueView0" = "99.99M+";
"MicroGiftValueView1" = "%lldM";
"MicroView0" = "Mic";
"MicroView0" = "NO.";
"MicroView1" = "Slot";
"MicroView2" = "Red Team";
"MicroView3" = "Blue Team";

View File

@@ -861,9 +861,9 @@
"XPRoomPKTimePickerView7" = "0秒";
"XPRoomPKTimePickerView8" = "30秒";
"XPRoomPKSelectUserView0" = "0号麦位";
"XPRoomPKSelectUserView0" = "NO.0";
"XPRoomPKSelectUserView1" = "确定";
"XPRoomPKSelectUserView2" = "%d号麦位";
"XPRoomPKSelectUserView2" = "NO.%d";
"XPRoomPKUserView0" = "等待上麦";
"XPRoomPKUserView1" = "等待上麦";
@@ -982,7 +982,7 @@
"XPUserCardPresenter1" = "房主位";
"XPUserCardPresenter2" = "%d号男神位";
"XPUserCardPresenter3" = "%d号女神位";
"XPUserCardPresenter4" = "%d号麦位";
"XPUserCardPresenter4" = "NO.%d";
"XPUserCardPresenter6" = "开麦";
"XPUserCardPresenter9" = "抱Ta下麦";
"XPUserCardPresenter11" = "解锁";
@@ -1208,7 +1208,7 @@
"MicroGiftValueView0" = "9999万+";
"MicroGiftValueView1" = "%lld万";
"MicroView0" = "号麦位";
"MicroView0" = "NO.";
"MicroView1" = "坑位";
"MicroView2" = "红队";
"MicroView3" = "蓝队";

View File

@@ -862,9 +862,9 @@
"XPRoomPKTimePickerView7" = "0秒";
"XPRoomPKTimePickerView8" = "30秒";
"XPRoomPKSelectUserView0" = "0號麥位";
"XPRoomPKSelectUserView0" = "NO.0";
"XPRoomPKSelectUserView1" = "確定";
"XPRoomPKSelectUserView2" = "%d號麥位";
"XPRoomPKSelectUserView2" = "NO.%d";
"XPRoomPKUserView0" = "等待上麥";
"XPRoomPKUserView1" = "等待上麥";
@@ -983,7 +983,7 @@
"XPUserCardPresenter1" = "房主位";
"XPUserCardPresenter2" = "%d號男神位";
"XPUserCardPresenter3" = "%d號女神位";
"XPUserCardPresenter4" = "%d號麥位";
"XPUserCardPresenter4" = "NO.%d";
"XPUserCardPresenter6" = "開麥";
"XPUserCardPresenter9" = "抱Ta下麥";
"XPUserCardPresenter11" = "解鎖";
@@ -1211,7 +1211,7 @@
"MicroGiftValueView0" = "9999萬+";
"MicroGiftValueView1" = "%lld萬";
"MicroView0" = "號麥位";
"MicroView0" = "NO.";
"MicroView1" = "坑位";
"MicroView2" = "紅隊";
"MicroView3" = "藍隊";