公屏显示拉黑和踢出房间的公屏显示
This commit is contained in:
@@ -1600,8 +1600,6 @@
|
||||
E82325FB274E4735003A3332 /* XPUserCardItemModel.m */,
|
||||
E899C68A275093B700E189E5 /* XPUserCardMicroItemModel.h */,
|
||||
E899C68B275093B800E189E5 /* XPUserCardMicroItemModel.m */,
|
||||
E833ED0B274FAD1C00A2463B /* XPKickUserModel.h */,
|
||||
E833ED0C274FAD1C00A2463B /* XPKickUserModel.m */,
|
||||
E899C68727508F4E00E189E5 /* XPUserCardInfoModel.h */,
|
||||
E899C68827508F4E00E189E5 /* XPUserCardInfoModel.m */,
|
||||
);
|
||||
@@ -1862,6 +1860,7 @@
|
||||
E884C3772743B67E00E1EBED /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E899C68D2750DA3C00E189E5 /* CustomMessage */,
|
||||
E884C36D2743AAC800E1EBED /* AttachmentModel.h */,
|
||||
E884C36E2743AAC800E1EBED /* AttachmentModel.m */,
|
||||
);
|
||||
@@ -1935,6 +1934,15 @@
|
||||
path = MineInfo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E899C68D2750DA3C00E189E5 /* CustomMessage */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E833ED0B274FAD1C00A2463B /* XPKickUserModel.h */,
|
||||
E833ED0C274FAD1C00A2463B /* XPKickUserModel.m */,
|
||||
);
|
||||
path = CustomMessage;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E89D60B7271D6417001F8895 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/25.
|
||||
//
|
||||
|
||||
///用户被踢出房间的模型
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
@@ -18,6 +18,7 @@
|
||||
#import "XPMessageRemoteExtModel.h"
|
||||
#import "AttachMentModel.h"
|
||||
#import "GiftReceiveInfoModel.h"
|
||||
#import "XPKickUserModel.h"
|
||||
|
||||
#import "NetImageView.h"
|
||||
|
||||
@@ -54,6 +55,9 @@
|
||||
return [self createBatchMicroSendGiftAttribute:attachment sendInfo:model];
|
||||
} else if(first == CustomMessageType_Room_Tip) {///分享/收藏房间
|
||||
return [self createShareOrAttentionRoomAttribute:attachment sendInfo:model];
|
||||
} else if(first == CustomMessageType_Kick_User) {
|
||||
XPKickUserModel * kickModel = [XPKickUserModel modelWithJSON:attachment.data];
|
||||
return [self createKickUserAttribute:attachment info:kickModel];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
@@ -114,6 +118,23 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
#pragma mark - 踢出房间/拉黑/下麦
|
||||
+ (NSAttributedString *)createKickUserAttribute:(AttachmentModel *)attachment info:(XPKickUserModel *)info {
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.targetNick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"被" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.handleNick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
NSString * content= @"";
|
||||
if (attachment.second == Custom_Message_Sub_Kick_BeKicked) {
|
||||
content = @"请出房间";
|
||||
} else if(attachment.second == Custom_Message_Sub_Kick_BlackList) {
|
||||
content = @"关进小黑屋";
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:content color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
return attribute;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - 收藏房间和分享房间
|
||||
+ (NSAttributedString *)createShareOrAttentionRoomAttribute:(AttachmentModel *)attachment sendInfo:(XPMessageRemoteExtModel *)sendInfo {
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
|
@@ -168,6 +168,11 @@
|
||||
@(Custom_Message_Sub_Room_Tip_ShareRoom),
|
||||
@(Custom_Message_Sub_Room_Tip_Attention_Owner),
|
||||
nil],
|
||||
@(CustomMessageType_Kick_User):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Kick_BeKicked),
|
||||
@(Custom_Message_Sub_Kick_BlackList),
|
||||
nil],
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -111,7 +111,6 @@
|
||||
UIGraphicsEndImageContext();
|
||||
self.avatarImageView.backgroundColor = [UIColor colorWithPatternImage:newImage];
|
||||
self.postionLabel.text = [NSString stringWithFormat:@"%d", micState.position + 1];
|
||||
self.stackView.hidden = micState.position == -1;
|
||||
}
|
||||
|
||||
- (void)configUser:(UserInfoModel *)userInfo {
|
||||
|
Reference in New Issue
Block a user