优化
This commit is contained in:
@@ -36,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,copy) NSString *fromNick;
|
||||
@property (nonatomic,assign) UserEnterRoomFromType fromType;
|
||||
@property (nonatomic,copy) NSString *fromUid;
|
||||
@property(nonatomic,copy) NSString *uid;
|
||||
///名牌的
|
||||
@property (nonatomic,copy) NSString *inRoomNameplatePic;
|
||||
///铭牌的字
|
||||
|
@@ -203,7 +203,6 @@
|
||||
if(![userList containsObject:selectUid]){
|
||||
[userList addObject:selectUid];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return userList;
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#import "XPUserCardViewController.h"
|
||||
#import "XPRoomSettingPresenter.h"
|
||||
#import "XPRoomSettingProtocol.h"
|
||||
@interface XPRoomOnLineViewController ()<UITableViewDelegate, UITableViewDataSource, NIMChatManagerDelegate,XPRoomSettingProtocol>
|
||||
@interface XPRoomOnLineViewController ()<XPUserCardViewControllerDelegate,UITableViewDelegate, UITableViewDataSource, NIMChatManagerDelegate,XPRoomSettingProtocol>
|
||||
///导航栏
|
||||
@property (nonatomic,strong) UIView * navView;
|
||||
///返回按钮
|
||||
@@ -202,16 +202,13 @@
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
NIMChatroomMember * member = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
NSDictionary * extDic = [member.roomExt toJSONObject];
|
||||
XPMessageRemoteExtModel * userInfo = [XPMessageRemoteExtModel modelWithDictionary:[extDic objectForKey:member.userId]];
|
||||
XPMessageRemoteExtModel * userInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
if (userInfo.enterHide) {
|
||||
return;
|
||||
}
|
||||
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
|
||||
NSString * targetUid = member.userId;
|
||||
NSString * targetUid = userInfo.uid;
|
||||
XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init];
|
||||
[[self.hostDelegate.getMicroQueue allValues] enumerateObjectsUsingBlock:^(MicroQueueModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (targetUid.integerValue == obj.userInfo.uid) {
|
||||
@@ -229,11 +226,15 @@
|
||||
model.micQueue = self.hostDelegate.getMicroQueue;
|
||||
model.hideSendGiftItem = YES;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
userCardVC.delegate = self;
|
||||
[self.navigationController presentViewController:userCardVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark- XPUserCardViewControllerDelegate
|
||||
-(void)clickChatAction{
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
#pragma mark - Event Response
|
||||
- (void)backButtonAction:(UIButton *)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
|
@@ -10,7 +10,14 @@
|
||||
#import "XPUserCardInfoModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPUserCardViewControllerDelegate <NSObject>
|
||||
|
||||
-(void)clickChatAction;
|
||||
|
||||
@end
|
||||
|
||||
@interface XPUserCardViewController : MvpViewController
|
||||
@property(nonatomic,weak) id<XPUserCardViewControllerDelegate>delegate;
|
||||
- (instancetype)initWithUser:(XPUserCardInfoModel *)cardInfo;
|
||||
|
||||
@end
|
||||
|
@@ -781,6 +781,9 @@
|
||||
case UserCardItemType_Chat:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"chat"}];
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(clickChatAction)]){
|
||||
[self.delegate clickChatAction];
|
||||
}
|
||||
[self dismissViewControllerAnimated:YES completion:^{
|
||||
UIViewController * controller = (UIViewController *)self.cardInfo.delegate;
|
||||
XPRoomHalfMessageView *halfMessageView = [[XPRoomHalfMessageView alloc] initWithFrame:CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight) controller:controller];
|
||||
@@ -970,6 +973,9 @@
|
||||
break;
|
||||
case UserCardItemType_AtUser:
|
||||
{
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(clickChatAction)]){
|
||||
[self.delegate clickChatAction];
|
||||
}
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"atUser"}];
|
||||
if (self.cardInfo.roomInfo.isCloseScreen) {
|
||||
[self showErrorToast:YMLocalizedString(@"XPUserCardViewController16")];
|
||||
|
Reference in New Issue
Block a user