Browse Source

直播、网络教室问题修复

Steven 1 year ago
parent
commit
41f9a5a257
22 changed files with 222 additions and 744 deletions
  1. 11 5
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. 6 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Conversation/Contents.json
  3. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Conversation/group_more.imageset/Contents.json
  4. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Conversation/group_more.imageset/group_more@2x.png
  5. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Conversation/group_more.imageset/group_more@3x.png
  6. 2 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Category/UIView+KSLayer.h
  7. 9 1
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Category/UIView+KSLayer.m
  8. 19 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIButton+KSDelayAction.h
  9. 55 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIButton+KSDelayAction.m
  10. 22 22
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIControl+ButtonAction.m
  11. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatAddressViewController.m
  12. 0 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSConversationListController.h
  13. 1 694
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSConversationListController.m
  14. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSGroupConversationController.m
  15. 6 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/Model/KSEnterLiveroomManager.m
  16. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/Model/LiveModuleService.m
  17. 31 1
      KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/Controller/TXClassroomViewController.m
  18. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/Model/LoginHelper.m
  19. 4 2
      KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/MainContainerView/VideoMaskView.m
  20. 9 8
      KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/VideoList/KSBeatView.m
  21. 18 2
      KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/VideoList/TXClassroomVideoListCell.m
  22. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/TXLive/View/TXSeatContainerView.m

+ 11 - 5
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -543,6 +543,7 @@
 		BC542E5D2840A60100633781 /* UserSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC542E5B2840A60000633781 /* UserSettingViewController.m */; };
 		BC542E612840A60E00633781 /* UseBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC542E5E2840A60D00633781 /* UseBodyView.m */; };
 		BC542E622840A60E00633781 /* UseBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC542E5F2840A60D00633781 /* UseBodyView.xib */; };
+		BC5557CA2AA826C700BA4CAD /* UIButton+KSDelayAction.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5557C82AA826C700BA4CAD /* UIButton+KSDelayAction.m */; };
 		BC5F765029001C8D00B433E0 /* HomeDragButton.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5F764F29001C8D00B433E0 /* HomeDragButton.m */; };
 		BC60E3CC287D552800B05441 /* AccountDeleteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC60E3C5287D552800B05441 /* AccountDeleteViewController.m */; };
 		BC60E3CD287D552800B05441 /* DeleteAccountBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC60E3C9287D552800B05441 /* DeleteAccountBodyView.m */; };
@@ -2039,6 +2040,8 @@
 		BC542E5E2840A60D00633781 /* UseBodyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UseBodyView.m; sourceTree = "<group>"; };
 		BC542E5F2840A60D00633781 /* UseBodyView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UseBodyView.xib; sourceTree = "<group>"; };
 		BC542E602840A60D00633781 /* UseBodyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UseBodyView.h; sourceTree = "<group>"; };
+		BC5557C82AA826C700BA4CAD /* UIButton+KSDelayAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+KSDelayAction.m"; sourceTree = "<group>"; };
+		BC5557C92AA826C700BA4CAD /* UIButton+KSDelayAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+KSDelayAction.h"; sourceTree = "<group>"; };
 		BC5F764E29001C8D00B433E0 /* HomeDragButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeDragButton.h; sourceTree = "<group>"; };
 		BC5F764F29001C8D00B433E0 /* HomeDragButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeDragButton.m; sourceTree = "<group>"; };
 		BC60E3C5287D552800B05441 /* AccountDeleteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccountDeleteViewController.m; sourceTree = "<group>"; };
@@ -3617,6 +3620,8 @@
 				2779339227E3249D0010E277 /* UIColor+Extend.m */,
 				2779339E27E3249D0010E277 /* UIControl+ButtonAction.h */,
 				2779337927E3249C0010E277 /* UIControl+ButtonAction.m */,
+				BC5557C92AA826C700BA4CAD /* UIButton+KSDelayAction.h */,
+				BC5557C82AA826C700BA4CAD /* UIButton+KSDelayAction.m */,
 				2779339D27E3249D0010E277 /* UIDevice+zhDeviceType.h */,
 				2779337A27E3249D0010E277 /* UIDevice+zhDeviceType.m */,
 				2779338B27E3249D0010E277 /* UIImage+Color.h */,
@@ -6013,14 +6018,14 @@
 		BCC0F6342A8CD8F400C4EFA4 /* DanMuChat */ = {
 			isa = PBXGroup;
 			children = (
+				BCC0F63C2A8CD8F400C4EFA4 /* DanInputBar */,
+				BCC0F63A2A8CD8F400C4EFA4 /* TXDanBottomView.h */,
 				BCC0F6352A8CD8F400C4EFA4 /* TXDanBottomView.m */,
-				BCC0F6362A8CD8F400C4EFA4 /* TXDanMuView.h */,
-				BCC0F6372A8CD8F400C4EFA4 /* TXDanChatCell.m */,
-				BCC0F6382A8CD8F400C4EFA4 /* TXDanChatCell.xib */,
 				BCC0F6392A8CD8F400C4EFA4 /* TXDanBottomView.xib */,
-				BCC0F63A2A8CD8F400C4EFA4 /* TXDanBottomView.h */,
 				BCC0F63B2A8CD8F400C4EFA4 /* TXDanChatCell.h */,
-				BCC0F63C2A8CD8F400C4EFA4 /* DanInputBar */,
+				BCC0F6372A8CD8F400C4EFA4 /* TXDanChatCell.m */,
+				BCC0F6382A8CD8F400C4EFA4 /* TXDanChatCell.xib */,
+				BCC0F6362A8CD8F400C4EFA4 /* TXDanMuView.h */,
 				BCC0F6412A8CD8F400C4EFA4 /* TXDanMuView.m */,
 			);
 			path = DanMuChat;
@@ -7610,6 +7615,7 @@
 				2779351B27E324A60010E277 /* UIControl+ButtonAction.m in Sources */,
 				27F9032F27E87C2E00C08A19 /* AudioPlayManager.m in Sources */,
 				BCC0F66A2A8CD8F500C4EFA4 /* TXDanMuView.m in Sources */,
+				BC5557CA2AA826C700BA4CAD /* UIButton+KSDelayAction.m in Sources */,
 				BC28885C2A80F9880064B773 /* AppDelegate+AppService.m in Sources */,
 				2779357C27E324A70010E277 /* NSString+MD5.m in Sources */,
 				BC106C112A933829000759A9 /* TXConstMessage.m in Sources */,

+ 6 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Conversation/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Conversation/group_more.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Conversation/group_more.imageset/group_more@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Conversation/group_more.imageset/group_more@3x.png


+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Common/Tools/Category/UIView+KSLayer.h

@@ -21,6 +21,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)configLayerWithType:(KSLAYER_RADIUS)type radius:(CGFloat)radius;
 
++ (CAGradientLayer *)createGradientLayerFromColor:(UIColor *)fromColor startPoint:(CGPoint)startPoint endColor:(UIColor *)endColor endPoint:(CGPoint)endPoint bounds:(CGRect)bounds;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 9 - 1
KulexiuForStudent/KulexiuForStudent/Common/Tools/Category/UIView+KSLayer.m

@@ -55,7 +55,15 @@
         }
         self.layer.masksToBounds = YES;
     }
-    
 }
 
++ (CAGradientLayer *)createGradientLayerFromColor:(UIColor *)fromColor startPoint:(CGPoint)startPoint endColor:(UIColor *)endColor endPoint:(CGPoint)endPoint bounds:(CGRect)bounds {
+    CAGradientLayer *gradientLayer = [CAGradientLayer layer];
+    gradientLayer.colors = @[(__bridge id)fromColor.CGColor, (__bridge id)endColor.CGColor];
+    gradientLayer.startPoint = startPoint;
+    gradientLayer.endPoint = endPoint;
+    gradientLayer.frame = bounds;
+    gradientLayer.locations = @[@(0),@(1.0f)];
+    return gradientLayer;
+}
 @end

+ 19 - 0
KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIButton+KSDelayAction.h

@@ -0,0 +1,19 @@
+//
+//  UIButton+KSDelayAction.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/8/11.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface UIButton (KSDelayAction)
+
+/** 延迟响应时间间隔, 默认0.5秒  */
+@property (nonatomic, assign) NSTimeInterval delayAction;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 55 - 0
KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIButton+KSDelayAction.m

@@ -0,0 +1,55 @@
+//
+//  UIButton+KSDelayAction.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/8/11.
+//
+
+#import "UIButton+KSDelayAction.h"
+#import <objc/runtime.h>
+
+@implementation UIButton (KSDelayAction)
+
++ (void)load {
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        SEL selA =@selector(sendAction:to:forEvent:);
+        SEL selB =@selector(rzdelaySendAction:to:forEvent:);
+        Method methodA = class_getInstanceMethod(self, selA);
+        Method methodB = class_getInstanceMethod(self, selB);
+        BOOL isAdd = class_addMethod(self, selA, method_getImplementation(methodB), method_getTypeEncoding(methodB));
+        if (isAdd) {
+            class_replaceMethod(self, selB,method_getImplementation(methodA),method_getTypeEncoding(methodA));
+        } else {
+            method_exchangeImplementations(methodA, methodB);
+        }
+    });
+}
+
+- (NSTimeInterval)delayAction {
+    NSNumber *number = objc_getAssociatedObject(self, @"rzdelayAction");
+    if (number == nil) {
+        number = @(0.5); // 默认0.5秒
+    }
+    return (NSTimeInterval)number.doubleValue;
+}
+
+- (void)setDelayAction:(NSTimeInterval)delayAction {
+    objc_setAssociatedObject(self, @"rzdelayAction", @(delayAction), OBJC_ASSOCIATION_ASSIGN);
+}
+
+- (void)rzdelaySendAction:(SEL)action to:(id)target forEvent:(UIEvent*)event {
+    if ([self isKindOfClass:[UIButton class]]) {
+        UITouchPhase phase = event.allTouches.anyObject.phase;
+        if (phase == UITouchPhaseEnded || phase == UITouchPhaseCancelled) {
+            self.userInteractionEnabled = NO;
+            [self performSelector:@selector(setUInteractionEnabled:) withObject:@(YES) afterDelay:self.delayAction];
+        }
+    }
+    [self rzdelaySendAction:action to:target forEvent:event];
+}
+
+- (void)setUInteractionEnabled:(BOOL)enable {
+    self.userInteractionEnabled = YES;
+}
+@end

+ 22 - 22
KulexiuForStudent/KulexiuForStudent/Common/Tools/Extension/UIControl+ButtonAction.m

@@ -32,28 +32,28 @@
     [self setIsIgnoreEvent:NO];
 }
 
-+ (void)load {
-    
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        SEL selA = @selector(sendAction:to:forEvent:);
-        SEL selB = @selector(mySendAction:to:forEvent:);
-        Method methodA = class_getInstanceMethod(self, selA);
-        Method methodB = class_getInstanceMethod(self, selB);
-        
-        // 将methodB的实现方法添加到系统方法中 也就是说将methodA方法指针添加成方法methodB的返回值表示十分添加成功
-        BOOL isAdd = class_addMethod(self, selA, method_getImplementation(methodB), method_getTypeEncoding(methodB));
-        
-        // 添加成功了说明本类中不存在methodB所以此方法必须将方法b的实现指针替换成方法A的,否则b方法将没有实现
-        if (isAdd) {
-            class_replaceMethod(self, selB, method_getImplementation(methodA), method_getTypeEncoding(methodA));
-        }
-        else {
-            // 添加失败说明本类中有methodB的实现方法,此时只需要将methodA和methodB的IMP互换
-            method_exchangeImplementations(methodA, methodB);
-        }
-    });
-}
+//+ (void)load {
+//    
+//    static dispatch_once_t onceToken;
+//    dispatch_once(&onceToken, ^{
+//        SEL selA = @selector(sendAction:to:forEvent:);
+//        SEL selB = @selector(mySendAction:to:forEvent:);
+//        Method methodA = class_getInstanceMethod(self, selA);
+//        Method methodB = class_getInstanceMethod(self, selB);
+//        
+//        // 将methodB的实现方法添加到系统方法中 也就是说将methodA方法指针添加成方法methodB的返回值表示十分添加成功
+//        BOOL isAdd = class_addMethod(self, selA, method_getImplementation(methodB), method_getTypeEncoding(methodB));
+//        
+//        // 添加成功了说明本类中不存在methodB所以此方法必须将方法b的实现指针替换成方法A的,否则b方法将没有实现
+//        if (isAdd) {
+//            class_replaceMethod(self, selB, method_getImplementation(methodA), method_getTypeEncoding(methodA));
+//        }
+//        else {
+//            // 添加失败说明本类中有methodB的实现方法,此时只需要将methodA和methodB的IMP互换
+//            method_exchangeImplementations(methodA, methodB);
+//        }
+//    });
+//}
 
 - (void)mySendAction:(SEL)action to:(id)target forEvent:(UIEvent *)event {
     if ([NSStringFromClass(self.class) isEqualToString:@"UIButton"]) {

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatAddressViewController.m

@@ -55,6 +55,7 @@
     self.pagerView.mainTableView.gestureDelegate = self;
     self.pagerView.backgroundColor = [UIColor clearColor];
     self.pagerView.mainTableView.backgroundColor = [UIColor clearColor];
+    self.pagerView.isListHorizontalScrollEnabled = NO; // 不允许左右滑动
     [self.view addSubview:self.pagerView];
     self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerView.listContainerView;
 }

+ 0 - 2
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSConversationListController.h

@@ -11,8 +11,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface KSConversationListController : TUIConversationListController
 
-@property(nonatomic, strong) UIView *tableViewContainer;
-
 
 @end
 

+ 1 - 694
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSConversationListController.m

@@ -6,708 +6,15 @@
 //
 
 #import "KSConversationListController.h"
-#import <TIMCommon/TIMDefine.h>
-#import <TUICore/TUICore.h>
-#import <TUICore/TUIThemeManager.h>
-#import "TUIConversationCell.h"
-#import "TUIConversationListDataProvider.h"
-#import "TUIFoldListViewController.h"
 
-#define GroupBtnSpace 24
-#define GroupScrollViewHeight 30
 
-@interface KSConversationListController ()<UIGestureRecognizerDelegate,
-UIPopoverPresentationControllerDelegate,
-TUIConversationTableViewDelegate,
-TUIPopViewDelegate,
-TUINotificationProtocol>
-@property(nonatomic, strong) TUINaviBarIndicatorView *titleView;
-@property(nonatomic, strong) TUIConversationListBaseDataProvider *settingDataProvider;
-@property(nonatomic, strong) UIView *bannerView;
-@property(nonatomic, assign) CGFloat viewHeight;
+@interface KSConversationListController ()
 
-@property(nonatomic, assign) BOOL actualShowConversationGroup;
-@property(nonatomic, strong) UIView *groupView;
-@property(nonatomic, strong) UIScrollView *groupScrollView;
-@property(nonatomic, strong) UIView *groupAnimationView;
-@property(nonatomic, strong) UIView *groupBtnContainer;
-@property(nonatomic, strong) NSMutableArray *groupItemList;
 
 @end
 
 @implementation KSConversationListController
 
-- (instancetype)init {
-    self = [super init];
-    if (self) {
-        self.isShowBanner = YES;
-        self.isShowConversationGroup = YES;
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onThemeChanged) name:TUIDidApplyingThemeChangedNotfication object:nil];
-    }
-    return self;
-}
-
-#pragma mark - NSNotification
-- (void)onThemeChanged {
-    self.groupAnimationView.layer.borderColor = [TUIConversationDynamicColor(@"conversation_group_bg_color", @"#EBECF0") CGColor];
-}
-
-#pragma mark - SettingDataProvider
-- (void)setDataProvider:(TUIConversationListBaseDataProvider *)dataProvider {
-    self.settingDataProvider = dataProvider;
-}
-
-- (TUIConversationListBaseDataProvider *)dataProvider {
-    return self.settingDataProvider;
-}
-
-#pragma mark - Life Cycle
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    [self setupNavigation];
-    [self setupViews];
-    [TUICore registerEvent:TUICore_TUIConversationGroupNotify subKey:@"" object:self];
-    [TUICore registerEvent:TUICore_TUIConversationMarkNotify subKey:@"" object:self];
-}
-
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    [self.currentTableView reloadData];
-}
-
-- (void)dealloc {
-    [NSNotificationCenter.defaultCenter removeObserver:self];
-    [TUICore unRegisterEventByObject:self];
-}
-
-- (void)setupNavigation {
-    UIButton *moreButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    [moreButton setImage:TIMCommonDynamicImage(@"nav_more_img", [UIImage imageNamed:TIMCommonImagePath(@"more")]) forState:UIControlStateNormal];
-    [moreButton addTarget:self action:@selector(rightBarButtonClick:) forControlEvents:UIControlEventTouchUpInside];
-    moreButton.imageView.contentMode = UIViewContentModeScaleAspectFit;
-    [moreButton.widthAnchor constraintEqualToConstant:24].active = YES;
-    [moreButton.heightAnchor constraintEqualToConstant:24].active = YES;
-    UIBarButtonItem *moreItem = [[UIBarButtonItem alloc] initWithCustomView:moreButton];
-    self.navigationController.navigationItem.rightBarButtonItem = moreItem;
-
-    self.navigationController.interactivePopGestureRecognizer.enabled = YES;
-    self.navigationController.interactivePopGestureRecognizer.delegate = self;
-}
-
-- (void)rightBarButtonClick:(UIButton *)rightBarButton {
-    NSMutableArray *menus = [NSMutableArray array];
-    TUIPopCellData *friend = [[TUIPopCellData alloc] init];
-
-    friend.image = TUIConversationDynamicImage(@"pop_icon_new_chat_img", [UIImage imageNamed:TUIConversationImagePath(@"new_chat")]);
-    friend.title = TIMCommonLocalizableString(ChatsNewChatText);
-    [menus addObject:friend];
-
-    TUIPopCellData *group = [[TUIPopCellData alloc] init];
-    group.image = TUIConversationDynamicImage(@"pop_icon_new_group_img", [UIImage imageNamed:TUIConversationImagePath(@"new_groupchat")]);
-    group.title = TIMCommonLocalizableString(ChatsNewGroupText);
-    [menus addObject:group];
-
-    CGFloat height = [TUIPopCell getHeight] * menus.count + TUIPopView_Arrow_Size.height;
-    CGFloat orginY = 0;
-    TUIPopView *popView = [[TUIPopView alloc] initWithFrame:CGRectMake(Screen_Width - 155, orginY, 145, height)];
-    CGRect frameInNaviView = [self.navigationController.view convertRect:rightBarButton.frame fromView:rightBarButton.superview];
-    popView.arrowPoint = CGPointMake(frameInNaviView.origin.x + frameInNaviView.size.width * 0.5, orginY);
-    popView.delegate = self;
-    [popView setData:menus];
-    [popView showInWindow:self.view.window];
-}
-
-- (void)setupViews {
-    self.view.backgroundColor = TUIConversationDynamicColor(@"conversation_bg_color", @"#FFFFFF");
-    self.viewHeight = self.view.mm_h;
-    if (self.isShowBanner) {
-        CGSize size = CGSizeMake(self.view.bounds.size.width, 60);
-        self.bannerView.mm_width(size.width).mm_height(60);
-        NSMutableDictionary *param = [NSMutableDictionary dictionary];
-        param[TUICore_TUIConversationExtension_ConversationListBanner_BannerSize] = NSStringFromCGSize(size);
-        param[TUICore_TUIConversationExtension_ConversationListBanner_ModalVC] = self;
-        BOOL result = [TUICore raiseExtension:TUICore_TUIConversationExtension_ConversationListBanner_ClassicExtensionID
-                                   parentView:self.bannerView
-                                        param:param];
-        if (!result) {
-            self.bannerView.mm_height(0);
-        }
-    }
-
-    [self.view addSubview:self.tableViewContainer];
-    [self.tableViewContainer addSubview:self.tableViewForAll];
-
-    if (self.isShowConversationGroup) {
-        // 延迟点时间加载,等待插件能力位异步加载完毕
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-          NSArray *extensionList = [TUICore getExtensionList:TUICore_TUIConversationExtension_ConversationGroupListBanner_ClassicExtensionID param:nil];
-          @weakify(self);
-          [[[RACObserve(self, actualShowConversationGroup) distinctUntilChanged] skip:0] subscribeNext:^(NSNumber *showConversationGroup) {
-            @strongify(self);
-            if ([showConversationGroup boolValue]) {
-                [self.tableViewContainer setFrame:CGRectMake(0, self.groupView.mm_maxY, self.view.mm_w, self.viewHeight - self.groupView.mm_maxY)];
-
-                self.groupItemList = [NSMutableArray array];
-                TUIConversationGroupItem *allGroupItem = [[TUIConversationGroupItem alloc] init];
-                allGroupItem.groupName = TIMCommonLocalizableString(TUIConversationGroupAll);
-                [self addGroup:allGroupItem];
-
-                for (TUIExtensionInfo *info in extensionList) {
-                    TUIConversationGroupItem *groupItem = info.data[TUICore_TUIConversationExtension_ConversationGroupListBanner_GroupItemKey];
-                    if (groupItem) {
-                        [self addGroup:groupItem];
-                    }
-                }
-                [self onSelectGroup:allGroupItem];
-            } else {
-                self.tableViewContainer.frame = CGRectMake(0, self.bannerView.mm_maxY, self.view.mm_w, self.viewHeight - self.bannerView.mm_maxY);
-                self.tableViewForAll.frame = self.tableViewContainer.bounds;
-            }
-          }];
-          self.actualShowConversationGroup = (extensionList.count > 0);
-        });
-    } else {
-        self.tableViewContainer.frame = CGRectMake(0, self.bannerView.mm_maxY, self.view.mm_w, self.viewHeight - self.bannerView.mm_maxY);
-        self.tableViewForAll.frame = self.tableViewContainer.bounds;
-    }
-}
-
-- (UIView *)bannerView {
-    if (!_bannerView) {
-        _bannerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
-        [self.view addSubview:_bannerView];
-    }
-    return _bannerView;
-}
-
-- (TUIConversationTableView *)currentTableView {
-    for (UIView *view in self.tableViewContainer.subviews) {
-        if ([view isKindOfClass:[TUIConversationTableView class]]) {
-            return (TUIConversationTableView *)view;
-        }
-    }
-    return nil;
-}
-
-- (UIView *)tableViewContainer {
-    if (!_tableViewContainer) {
-        _tableViewContainer = [[UIView alloc] init];
-        _tableViewContainer.autoresizesSubviews = YES;
-    }
-    return _tableViewContainer;
-}
-
-
-
-- (UIView *)groupView {
-    if (!_groupView) {
-        _groupView = [[UIView alloc] initWithFrame:CGRectMake(0, self.bannerView.mm_maxY, self.view.mm_w, 60)];
-        [self.view addSubview:_groupView];
-
-        CGFloat groupExtensionBtnLeft = _groupView.mm_w - GroupScrollViewHeight - kScale375(16);
-        self.groupBtnContainer = [[UIView alloc] initWithFrame:CGRectMake(groupExtensionBtnLeft, 18, GroupScrollViewHeight, GroupScrollViewHeight)];
-        [_groupView addSubview:self.groupBtnContainer];
-        [TUICore raiseExtension:TUICore_TUIConversationExtension_ConversationGroupManagerContainer_ClassicExtensionID
-                     parentView:self.groupBtnContainer
-                          param:@{TUICore_TUIConversationExtension_ConversationGroupManagerContainer_ParentVCKey : self}];
-
-        CGFloat groupScrollViewWidth = self.groupBtnContainer.mm_x - kScale375(16) - kScale375(10);
-        self.groupScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(kScale375(16), 18, groupScrollViewWidth, GroupScrollViewHeight)];
-        self.groupScrollView.backgroundColor = TUIConversationDynamicColor(@"conversation_group_bg_color", @"#EBECF0");
-        self.groupScrollView.showsHorizontalScrollIndicator = NO;
-        self.groupScrollView.showsVerticalScrollIndicator = NO;
-        self.groupScrollView.bounces = NO;
-        self.groupScrollView.scrollEnabled = YES;
-        self.groupScrollView.layer.cornerRadius = GroupScrollViewHeight / 2.0;
-        self.groupScrollView.layer.masksToBounds = YES;
-        [_groupView addSubview:self.groupScrollView];
-        @weakify(self);
-        [[[RACObserve(self.groupScrollView, contentSize) distinctUntilChanged] skip:1] subscribeNext:^(NSValue *contentSizeValue) {
-          @strongify(self);
-          self.groupScrollView.mm_w = MIN(groupScrollViewWidth, [contentSizeValue CGSizeValue].width);
-        }];
-
-        self.groupAnimationView = [[UIView alloc] init];
-        self.groupAnimationView.backgroundColor = TUIConversationDynamicColor(@"conversation_group_animate_view_color", @"#FFFFFF");
-        self.groupAnimationView.layer.cornerRadius = GroupScrollViewHeight / 2.0;
-        self.groupAnimationView.layer.masksToBounds = YES;
-        self.groupAnimationView.layer.borderWidth = 1;
-        self.groupAnimationView.layer.borderColor = [TUIConversationDynamicColor(@"conversation_group_bg_color", @"#EBECF0") CGColor];
-        [self.groupScrollView addSubview:self.groupAnimationView];
-    }
-    return _groupView;
-}
-
-#pragma mark Conversation Group Manager
-- (void)createGroupBtn:(TUIConversationGroupItem *)groupItem positionX:(CGFloat)positionX {
-    UIButton *groupBtn = [UIButton buttonWithType:UIButtonTypeCustom];
-    [groupBtn setBackgroundColor:[UIColor clearColor]];
-    [groupBtn setAttributedTitle:[self getGroupBtnAttributedString:groupItem] forState:UIControlStateNormal];
-    [groupBtn setTitleColor:TUIConversationDynamicColor(@"conversation_group_btn_unselect_color", @"#666666") forState:UIControlStateNormal];
-    [groupBtn.titleLabel setFont:[UIFont systemFontOfSize:16]];
-    [groupBtn addTarget:self action:@selector(onGroupBtnClick:) forControlEvents:UIControlEventTouchUpInside];
-    [groupBtn sizeToFit];
-    groupBtn.mm_x = positionX;
-    groupBtn.mm_w = groupBtn.mm_w + GroupBtnSpace;
-    groupBtn.mm_h = GroupScrollViewHeight;
-    groupItem.groupBtn = groupBtn;
-}
-
-- (void)updateGroupBtn:(TUIConversationGroupItem *)groupItem {
-    [groupItem.groupBtn setAttributedTitle:[self getGroupBtnAttributedString:groupItem] forState:UIControlStateNormal];
-    [groupItem.groupBtn sizeToFit];
-    groupItem.groupBtn.mm_w = groupItem.groupBtn.mm_w + GroupBtnSpace;
-    groupItem.groupBtn.mm_h = GroupScrollViewHeight;
-}
-
-- (void)onGroupBtnClick:(UIButton *)btn {
-    for (TUIConversationGroupItem *groupItem in self.groupItemList) {
-        if ([groupItem.groupBtn isEqual:btn]) {
-            [self onSelectGroup:groupItem];
-            return;
-        }
-    }
-}
-
-- (void)loadGroupList:(NSArray<TUIConversationGroupItem *> *)groupItemList {
-    NSString *selectGroup = @"";
-    for (TUIConversationGroupItem *groupItem in self.groupItemList) {
-        if (groupItem.groupBtn.isSelected) {
-            selectGroup = groupItem.groupName;
-        }
-        [groupItem.groupBtn removeFromSuperview];
-    }
-    [self.groupItemList removeAllObjects];
-    [self.groupScrollView setContentSize:CGSizeZero];
-
-    for (TUIConversationGroupItem *groupItem in groupItemList) {
-        [self addGroup:groupItem];
-        if ([groupItem.groupName isEqualToString:selectGroup]) {
-            groupItem.groupBtn.selected = YES;
-            self.groupAnimationView.frame = groupItem.groupBtn.frame;
-        }
-    }
-}
-
-- (void)addGroup:(TUIConversationGroupItem *)addGroup {
-    [self createGroupBtn:addGroup positionX:self.groupScrollView.contentSize.width];
-    [self.groupItemList addObject:addGroup];
-    [self.groupScrollView addSubview:addGroup.groupBtn];
-    [self.groupScrollView setContentSize:CGSizeMake(addGroup.groupBtn.mm_maxX, GroupScrollViewHeight)];
-}
-
-- (void)insertGroup:(TUIConversationGroupItem *)insertGroup atIndex:(NSInteger)index {
-    if (index < self.groupItemList.count) {
-        for (int i = 0; i < self.groupItemList.count; ++i) {
-            TUIConversationGroupItem *groupItem = self.groupItemList[i];
-            if (i == index) {
-                [self createGroupBtn:insertGroup positionX:groupItem.groupBtn.mm_x];
-                [self.groupScrollView addSubview:insertGroup.groupBtn];
-            }
-            if (i >= index) {
-                groupItem.groupBtn.mm_x += insertGroup.groupBtn.mm_w;
-                if (groupItem.groupBtn.isSelected) {
-                    self.groupAnimationView.frame = groupItem.groupBtn.frame;
-                }
-            }
-        }
-        [self.groupItemList insertObject:insertGroup atIndex:index];
-        [self.groupScrollView setContentSize:CGSizeMake(self.groupScrollView.contentSize.width + insertGroup.groupBtn.mm_w, GroupScrollViewHeight)];
-    } else {
-        [self addGroup:insertGroup];
-    }
-}
-
-- (void)updateGroup:(TUIConversationGroupItem *)updateGroup {
-    CGFloat offsetX = 0;
-    for (int i = 0; i < self.groupItemList.count; ++i) {
-        TUIConversationGroupItem *groupItem = self.groupItemList[i];
-        if (offsetX != 0) {
-            groupItem.groupBtn.mm_x += offsetX;
-        }
-        if ([groupItem.groupName isEqualToString:updateGroup.groupName]) {
-            groupItem.unreadCount = updateGroup.unreadCount;
-            CGFloat oldBtnWidth = groupItem.groupBtn.mm_w;
-            [self updateGroupBtn:groupItem];
-            CGFloat newBtnWidth = groupItem.groupBtn.mm_w;
-            offsetX = newBtnWidth - oldBtnWidth;
-        }
-        if (groupItem.groupBtn.isSelected) {
-            self.groupAnimationView.frame = groupItem.groupBtn.frame;
-        }
-    }
-    [self.groupScrollView setContentSize:CGSizeMake(self.groupScrollView.contentSize.width + offsetX, GroupScrollViewHeight)];
-}
-
-- (void)renameGroup:(NSString *)oldName newName:(NSString *)newName {
-    CGFloat offsetX = 0;
-    for (int i = 0; i < self.groupItemList.count; ++i) {
-        TUIConversationGroupItem *groupItem = self.groupItemList[i];
-        if (offsetX != 0) {
-            groupItem.groupBtn.mm_x += offsetX;
-        }
-        if ([groupItem.groupName isEqualToString:oldName]) {
-            groupItem.groupName = newName;
-            CGFloat oldBtnWidth = groupItem.groupBtn.mm_w;
-            [self updateGroupBtn:groupItem];
-            CGFloat newBtnWidth = groupItem.groupBtn.mm_w;
-            offsetX = newBtnWidth - oldBtnWidth;
-        }
-        if (groupItem.groupBtn.isSelected) {
-            self.groupAnimationView.frame = groupItem.groupBtn.frame;
-        }
-    }
-    [self.groupScrollView setContentSize:CGSizeMake(self.groupScrollView.contentSize.width + offsetX, GroupScrollViewHeight)];
-}
-
-- (void)deleteGroup:(TUIConversationGroupItem *)deleteGroup {
-    CGFloat offsetX = 0;
-    NSUInteger removeIndex = 0;
-    BOOL isSelectedGroup = NO;
-    for (int i = 0; i < self.groupItemList.count; ++i) {
-        TUIConversationGroupItem *groupItem = self.groupItemList[i];
-        if (offsetX != 0) {
-            groupItem.groupBtn.mm_x += offsetX;
-        }
-        if ([groupItem.groupName isEqualToString:deleteGroup.groupName]) {
-            [groupItem.groupBtn removeFromSuperview];
-            offsetX = -groupItem.groupBtn.mm_w;
-            removeIndex = i;
-            isSelectedGroup = groupItem.groupBtn.isSelected;
-        }
-        if (groupItem.groupBtn.isSelected) {
-            self.groupAnimationView.frame = groupItem.groupBtn.frame;
-        }
-    }
-    [self.groupItemList removeObjectAtIndex:removeIndex];
-    [self.groupScrollView setContentSize:CGSizeMake(self.groupScrollView.contentSize.width + offsetX, GroupScrollViewHeight)];
-    if (isSelectedGroup) {
-        [self onSelectGroup:self.groupItemList.firstObject];
-    }
-}
-
-- (void)onSelectGroup:(TUIConversationGroupItem *)selectGroupItem {
-    for (int i = 0; i < self.groupItemList.count; ++i) {
-        TUIConversationGroupItem *groupItem = self.groupItemList[i];
-        if ([groupItem.groupName isEqualToString:selectGroupItem.groupName]) {
-            groupItem.groupBtn.selected = YES;
-
-            [UIView animateWithDuration:0.1
-                             animations:^{
-                               self.groupAnimationView.frame = groupItem.groupBtn.frame;
-                             }];
-            for (UIView *view in self.tableViewContainer.subviews) {
-                [view removeFromSuperview];
-            }
-            if ([groupItem.groupName isEqualToString:TIMCommonLocalizableString(TUIConversationGroupAll)]) {
-                self.tableViewForAll.frame = self.tableViewContainer.bounds;
-                [self.tableViewContainer addSubview:self.tableViewForAll];
-            } else {
-                [TUICore raiseExtension:TUICore_TUIConversationExtension_ConversationListContainer_ClassicExtensionID
-                             parentView:self.tableViewContainer
-                                  param:@{TUICore_TUIConversationExtension_ConversationListContainer_GroupNameKey : groupItem.groupName}];
-                self.currentTableView.convDelegate = self;
-            }
-        } else {
-            groupItem.groupBtn.selected = NO;
-        }
-        [self updateGroupBtn:groupItem];
-    }
-}
-
-- (NSMutableAttributedString *)getGroupBtnAttributedString:(TUIConversationGroupItem *)groupItem {
-    NSMutableString *content = [NSMutableString stringWithString:groupItem.groupName];
-    NSInteger unreadCount = groupItem.unreadCount;
-    if (unreadCount > 0) {
-        [content appendString:@" "];
-        [content appendString:(unreadCount > 99 ? @"99+" : [@(unreadCount) stringValue])];
-    }
-    NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] initWithString:content];
-    if (groupItem.groupBtn.isSelected) {
-        [attributeString setAttributes:@{
-            NSFontAttributeName : [UIFont systemFontOfSize:16],
-            NSForegroundColorAttributeName : TUIConversationDynamicColor(@"conversation_group_btn_select_color", @"#147AFF")
-        }
-                                 range:NSMakeRange(0, groupItem.groupName.length)];
-    } else {
-        [attributeString setAttributes:@{
-            NSFontAttributeName : [UIFont systemFontOfSize:16],
-            NSForegroundColorAttributeName : TUIConversationDynamicColor(@"conversation_group_btn_unselect_color", @"#666666")
-        }
-                                 range:NSMakeRange(0, groupItem.groupName.length)];
-    }
-    [attributeString setAttributes:@{
-        NSForegroundColorAttributeName : TUIConversationDynamicColor(@"conversation_group_btn_select_color", @"#147AFF"),
-        NSFontAttributeName : [UIFont systemFontOfSize:12],
-        NSBaselineOffsetAttributeName : @(1)
-    }
-                             range:NSMakeRange(groupItem.groupName.length, content.length - groupItem.groupName.length)];
-    return attributeString;
-}
-
-#pragma mark TUINotificationProtocol
-- (void)onNotifyEvent:(NSString *)key subKey:(NSString *)subKey object:(nullable id)anObject param:(nullable NSDictionary *)param {
-    if ([key isEqualToString:TUICore_TUIConversationGroupNotify] || [key isEqualToString:TUICore_TUIConversationMarkNotify]) {
-        if (!self.actualShowConversationGroup) {
-            self.actualShowConversationGroup = YES;
-        }
-    }
-    if ([key isEqualToString:TUICore_TUIConversationGroupNotify]) {
-        if ([param objectForKey:TUICore_TUIConversationGroupNotify_GroupListLoadKey]) {
-            NSArray *groupItemList = [param objectForKey:TUICore_TUIConversationGroupNotify_GroupListLoadKey];
-            if (groupItemList && groupItemList.count > 0) {
-                [self loadGroupList:groupItemList];
-            }
-        } else if ([param objectForKey:TUICore_TUIConversationGroupNotify_GroupAddKey]) {
-            TUIConversationGroupItem *groupItem = [param objectForKey:TUICore_TUIConversationGroupNotify_GroupAddKey];
-            if (groupItem) {
-                [self addGroup:groupItem];
-            }
-        } else if ([param objectForKey:TUICore_TUIConversationGroupNotify_GroupUpdateKey]) {
-            TUIConversationGroupItem *groupItem = [param objectForKey:TUICore_TUIConversationGroupNotify_GroupUpdateKey];
-            if (groupItem) {
-                [self updateGroup:groupItem];
-            }
-        } else if ([param objectForKey:TUICore_TUIConversationGroupNotify_GroupRenameKey]) {
-            NSDictionary *renameItem = [param objectForKey:TUICore_TUIConversationGroupNotify_GroupRenameKey];
-            if (renameItem) {
-                [self renameGroup:renameItem.allKeys.firstObject newName:renameItem.allValues.firstObject];
-            }
-        } else if ([param objectForKey:TUICore_TUIConversationGroupNotify_GroupDeleteKey]) {
-            TUIConversationGroupItem *groupItem = [param objectForKey:TUICore_TUIConversationGroupNotify_GroupDeleteKey];
-            if (groupItem) {
-                [self deleteGroup:groupItem];
-            }
-        }
-    } else if ([key isEqualToString:TUICore_TUIConversationMarkNotify]) {
-        if ([param objectForKey:TUICore_TUIConversationGroupNotify_MarkAddKey]) {
-            TUIConversationGroupItem *groupItem = [param objectForKey:TUICore_TUIConversationGroupNotify_MarkAddKey];
-            if (groupItem) {
-                [self insertGroup:groupItem atIndex:groupItem.groupIndex];
-            }
-        } else if ([param objectForKey:TUICore_TUIConversationGroupNotify_MarkUpdateKey]) {
-            TUIConversationGroupItem *groupItem = [param objectForKey:TUICore_TUIConversationGroupNotify_MarkUpdateKey];
-            if (groupItem) {
-                [self updateGroup:groupItem];
-            }
-        }
-    }
-}
-
-#pragma TUIConversationTableViewDelegate
-- (void)tableViewDidScroll:(CGFloat)offsetY {
-    if (!self.bannerView || self.bannerView.hidden) {
-        return;
-    }
-    UIEdgeInsets safeAreaInsets = UIEdgeInsetsZero;
-    if (@available(iOS 11.0, *)) {
-        safeAreaInsets = self.currentTableView.adjustedContentInset;
-    }
-    CGFloat contentSizeHeight = self.currentTableView.contentSize.height + safeAreaInsets.top + safeAreaInsets.bottom;
-    if (contentSizeHeight > self.currentTableView.mm_h && self.currentTableView.contentOffset.y + self.currentTableView.mm_h > contentSizeHeight) {
-        return;
-    }
-    if (offsetY > self.bannerView.mm_h) {
-        offsetY = self.bannerView.mm_h;
-    }
-    if (offsetY < 0) {
-        offsetY = 0;
-    }
-    self.bannerView.mm_top(offsetY);
-    if (self.actualShowConversationGroup) {
-        self.groupView.mm_top(self.bannerView.mm_maxY);
-        self.tableViewContainer.mm_top(self.groupView.mm_maxY).mm_height(self.viewHeight - self.groupView.mm_maxY);
-    } else {
-        self.tableViewContainer.mm_top(self.bannerView.mm_maxY).mm_height(self.viewHeight - self.bannerView.mm_maxY);
-    }
-}
-
-- (void)tableViewDidSelectCell:(TUIConversationCellData *)data {
-    if (data.isLocalConversationFoldList) {
-        [TUIConversationListDataProvider cacheConversationFoldListSettings_FoldItemIsUnread:NO];
-
-        TUIFoldListViewController *foldVC = [[TUIFoldListViewController alloc] init];
-        [self.navigationController pushViewController:foldVC animated:YES];
-
-        @weakify(self);
-        foldVC.dismissCallback = ^(NSMutableAttributedString *_Nonnull foldStr, NSArray *_Nonnull sortArr, NSArray *_Nonnull needRemoveFromCacheMapArray) {
-          @strongify(self);
-          data.foldSubTitle = foldStr;
-          data.subTitle = data.foldSubTitle;
-          data.isMarkAsUnread = NO;
-
-          if (sortArr.count <= 0) {
-              data.orderKey = 0;
-              if ([self.dataProvider.conversationList containsObject:data]) {
-                  [self.dataProvider hideConversation:data];
-              }
-          }
-
-          for (NSString *removeId in needRemoveFromCacheMapArray) {
-              if ([self.dataProvider.markFoldMap objectForKey:removeId]) {
-                  [self.dataProvider.markFoldMap removeObjectForKey:removeId];
-              }
-          }
-
-          [TUIConversationListDataProvider cacheConversationFoldListSettings_FoldItemIsUnread:NO];
-          [self.currentTableView reloadData];
-        };
-        return;
-    }
-    if (self.delegate && [self.delegate respondsToSelector:@selector(conversationListController:didSelectConversation:)]) {
-        [self.delegate conversationListController:self didSelectConversation:data];
-    } else {
-        NSDictionary *param = @{
-            TUICore_TUIChatObjectFactory_ChatViewController_Title : data.title ?: @"",
-            TUICore_TUIChatObjectFactory_ChatViewController_UserID : data.userID ?: @"",
-            TUICore_TUIChatObjectFactory_ChatViewController_GroupID : data.groupID ?: @"",
-            TUICore_TUIChatObjectFactory_ChatViewController_AvatarImage : data.avatarImage ?: [UIImage new],
-            TUICore_TUIChatObjectFactory_ChatViewController_AvatarUrl : data.faceUrl ?: @"",
-            TUICore_TUIChatObjectFactory_ChatViewController_ConversationID : data.conversationID ?: @"",
-            TUICore_TUIChatObjectFactory_ChatViewController_AtMsgSeqs : data.atMsgSeqs ?: @[],
-            TUICore_TUIChatObjectFactory_ChatViewController_Draft : data.draftText ?: @""
-        };
-        [self.navigationController pushViewController:TUICore_TUIChatObjectFactory_ChatViewController_Classic param:param forResult:nil];
-    }
-}
-
-- (void)tableViewDidShowAlert:(UIAlertController *)ac {
-    [self presentViewController:ac animated:YES completion:nil];
-}
-
-#pragma TUIPopViewDelegate
-- (void)popView:(TUIPopView *)popView didSelectRowAtIndex:(NSInteger)index {
-    if (0 == index) {
-        [self startConversation:V2TIM_C2C];
-    } else {
-        [self startConversation:V2TIM_GROUP];
-    }
-}
-
-- (void)startConversation:(V2TIMConversationType)type {
-    __weak typeof(self) weakSelf = self;
-    void (^selectContactCompletion)(NSArray<TUICommonContactSelectCellData *> *) = ^(NSArray<TUICommonContactSelectCellData *> *array) {
-      if (V2TIM_C2C == type) {
-          NSDictionary *param = @{
-              TUICore_TUIChatObjectFactory_ChatViewController_Title : array.firstObject.title ?: @"",
-              TUICore_TUIChatObjectFactory_ChatViewController_UserID : array.firstObject.identifier ?: @"",
-              TUICore_TUIChatObjectFactory_ChatViewController_AvatarImage : array.firstObject.avatarImage ?: [UIImage new],
-              TUICore_TUIChatObjectFactory_ChatViewController_AvatarUrl : array.firstObject.avatarUrl.absoluteString ?: @""
-          };
-          [weakSelf.navigationController pushViewController:TUICore_TUIChatObjectFactory_ChatViewController_Classic param:param forResult:nil];
-
-          NSMutableArray *tempArray = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
-          [tempArray removeObjectAtIndex:tempArray.count - 2];
-          weakSelf.navigationController.viewControllers = tempArray;
-      } else {
-          NSString *loginUser = [[V2TIMManager sharedInstance] getLoginUser];
-          [[V2TIMManager sharedInstance]
-              getUsersInfo:@[ loginUser ]
-                      succ:^(NSArray<V2TIMUserFullInfo *> *infoList) {
-                        NSString *showName = loginUser;
-                        if (infoList.firstObject.nickName.length > 0) {
-                            showName = infoList.firstObject.nickName;
-                        }
-                        NSMutableString *groupName = [NSMutableString stringWithString:showName];
-                        for (TUICommonContactSelectCellData *item in array) {
-                            [groupName appendFormat:@"、%@", item.title];
-                        }
-
-                        if ([groupName length] > 10) {
-                            groupName = [groupName substringToIndex:10].mutableCopy;
-                        }
-                        void (^createGroupCompletion)(BOOL, V2TIMGroupInfo *) = ^(BOOL isSuccess, V2TIMGroupInfo *_Nonnull info) {
-                          NSDictionary *param = @{
-                              TUICore_TUIChatObjectFactory_ChatViewController_Title : info.groupName ?: @"",
-                              TUICore_TUIChatObjectFactory_ChatViewController_GroupID : info.groupID ?: @"",
-                              TUICore_TUIChatObjectFactory_ChatViewController_AvatarUrl : info.faceURL ?: @""
-                          };
-                          [self.navigationController pushViewController:TUICore_TUIChatObjectFactory_ChatViewController_Classic param:param forResult:nil];
-
-                          NSMutableArray *tempArray = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
-                          for (UIViewController *vc in self.navigationController.viewControllers) {
-                              if ([vc isKindOfClass:NSClassFromString(@"TUIGroupCreateController")] ||
-                                  [vc isKindOfClass:NSClassFromString(@"TUIContactSelectController")]) {
-                                  [tempArray removeObject:vc];
-                              }
-                          }
-
-                          weakSelf.navigationController.viewControllers = tempArray;
-                        };
-
-                        NSDictionary *param = @{
-                            TUICore_TUIContactObjectFactory_GetGroupCreateControllerMethod_TitleKey : array.firstObject.title ?: @"",
-                            TUICore_TUIContactObjectFactory_GetGroupCreateControllerMethod_GroupNameKey : groupName ?: @"",
-                            TUICore_TUIContactObjectFactory_GetGroupCreateControllerMethod_GroupTypeKey : GroupType_Work,
-                            TUICore_TUIContactObjectFactory_GetGroupCreateControllerMethod_CompletionKey : createGroupCompletion,
-                            TUICore_TUIContactObjectFactory_GetGroupCreateControllerMethod_ContactListKey : array ?: @[]
-                        };
-
-                        UIViewController *groupVC = (UIViewController *)[TUICore createObject:TUICore_TUIContactObjectFactory
-                                                                                          key:TUICore_TUIContactObjectFactory_GetGroupCreateControllerMethod
-                                                                                        param:param];
-                        [weakSelf.navigationController pushViewController:(UIViewController *)groupVC animated:YES];
-                      }
-                      fail:nil];
-      }
-    };
-    NSDictionary *param = @{
-        TUICore_TUIContactObjectFactory_GetContactSelectControllerMethod_TitleKey : TIMCommonLocalizableString(ChatsSelectContact),
-        TUICore_TUIContactObjectFactory_GetContactSelectControllerMethod_MaxSelectCount : @(type == V2TIM_C2C ? 1 : INT_MAX),
-        TUICore_TUIContactObjectFactory_GetContactSelectControllerMethod_CompletionKey : selectContactCompletion
-    };
-    UIViewController *vc = [TUICore createObject:TUICore_TUIContactObjectFactory
-                                             key:TUICore_TUIContactObjectFactory_GetContactSelectControllerMethod
-                                           param:param];
-    [self.navigationController pushViewController:vc animated:YES];
-}
-
-#pragma mark TUIConversationListDataProviderDelegate
-- (NSString *)getConversationDisplayString:(V2TIMConversation *)conversation {
-    if (self.delegate && [self.delegate respondsToSelector:@selector(getConversationDisplayString:)]) {
-        return [self.delegate getConversationDisplayString:conversation];
-    }
-    V2TIMMessage *msg = conversation.lastMessage;
-    if (msg.customElem == nil || msg.customElem.data == nil) {
-        return nil;
-    }
-    NSDictionary *param = [TUITool jsonData2Dictionary:msg.customElem.data];
-    if (param != nil && [param isKindOfClass:[NSDictionary class]]) {
-        NSString *businessID = param[@"businessID"];
-        if (![businessID isKindOfClass:[NSString class]]) {
-            return nil;
-        }
-
-        // whether custom jump message
-        if ([businessID isEqualToString:BussinessID_TextLink] || ([(NSString *)param[@"text"] length] > 0 && [(NSString *)param[@"link"] length] > 0)) {
-            NSString *desc = param[@"text"];
-            if (msg.status == V2TIM_MSG_STATUS_LOCAL_REVOKED) {
-                if (msg.isSelf) {
-                    desc = TIMCommonLocalizableString(TUIKitMessageTipsYouRecallMessage);
-                } else if (msg.userID.length > 0) {
-                    desc = TIMCommonLocalizableString(TUIKitMessageTipsOthersRecallMessage);
-                } else if (msg.groupID.length > 0) {
-                    /**
-                     * 对于群组消息的名称显示,优先显示群名片,昵称优先级其次,用户ID优先级最低。
-                     * For the name display of group messages, the group business card is displayed first, the nickname has the second priority, and the user ID
-                     * has the lowest priority.
-                     */
-                    NSString *userName = msg.nameCard;
-                    if (userName.length == 0) {
-                        userName = msg.nickName ?: msg.sender;
-                    }
-                    desc = [NSString stringWithFormat:TIMCommonLocalizableString(TUIKitMessageTipsRecallMessageFormat), userName];
-                }
-            }
-            return desc;
-        }
-    }
-    return nil;
-}
-
-- (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller {
-    return UIModalPresentationNone;
-}
 
 @end
 

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSGroupConversationController.m

@@ -52,7 +52,7 @@
 }
 
 - (void)configUI {
-    [self rightButton:[UIImage imageNamed:@"mine_setting"]];
+    [self rightButton:[UIImage imageNamed:@"group_more"]];
     self.vc = [[KSTXGroupChatViewController alloc] init];
     if (![NSString isEmptyString:self.highlightKeyword]) {
         self.vc.highlightKeyword = self.highlightKeyword;

+ 6 - 1
KulexiuForStudent/KulexiuForStudent/Module/Live/Model/KSEnterLiveroomManager.m

@@ -19,6 +19,9 @@ static BOOL isRequestRoomMsg  = NO;
         return;
     }
     [LiveModuleService imLiveBroadcastRoomQueryRoomRequest:KS_GET roomId:roomId success:^(NSDictionary * _Nonnull dic) {
+        if (callback) {
+            callback();
+        }
         isRequestRoomMsg = NO;
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self joinRoomWithMessage:[dic ks_dictionaryValueForKey:@"data"] controller:navCtrl];
@@ -28,7 +31,9 @@ static BOOL isRequestRoomMsg  = NO;
         }
     } faliure:^(NSError * _Nonnull error) {
         isRequestRoomMsg = NO;
-
+        if (callback) {
+            callback();
+        }
     }];
 }
 

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Live/Model/LiveModuleService.m

@@ -49,7 +49,7 @@
 /// @param success 成功
 /// @param faliure 失败
 + (void)LiveroomQuit:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
-    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/user/statusImUser"];
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/liveRoom/syncUserStatus"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:@"iOS" forKey:@"os"];
     [parm setValue:@"3" forKey:@"status"];

+ 31 - 1
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/Controller/TXClassroomViewController.m

@@ -33,6 +33,7 @@
 
 #import "TXDanMuView.h"
 #import "TXTimeView.h"
+#import "TXIMLinsenter.h"
 
 #define TitleViewHeight  (66)
 
@@ -183,6 +184,7 @@
     }
 }
 
+
 - (void)viewDidAppear:(BOOL)animated {
     [super viewDidAppear:animated];
     // 切换到横屏
@@ -190,12 +192,40 @@
     [self getRoomGroupConfig];
 }
 
+- (void)joinChatRoom {
+    if (TXIM_LINSENTER.loginIMSuccess == NO) {
+        NSString *imToken = UserDefault(IM_TOKEN);
+        [TXIM_LINSENTER TXIMLoginWithUserId:UserDefault(IM_USERID) sig:imToken callback:^(BOOL isSuccess, NSString * _Nullable msg) {
+            [self liveConversationJoin];
+        }];
+    }
+    else {
+        [self liveConversationJoin];
+    }
+}
+
+- (void)liveConversationJoin {
+    NSString *roomId = [ClassroomService sharedService].currentRoom.roomId;
+    [[V2TIMManager sharedInstance] joinGroup:roomId msg:nil succ:^{
+        
+    } fail:^(int code, NSString *desc) {
+        [self showErrorTips];
+    }];
+}
+
+- (void)showErrorTips {
+    [self.tipsView showTipsMessage:@"加入聊天群失败" inView:self.view];
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [[LoginHelper sharedInstance] logout];
+    });
+}
+
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     
     self.ks_prefersNavigationBarHidden = YES;
-    
+    [self joinChatRoom];
     self.view.backgroundColor = HexRGB(0xffffff);
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(leaveRoomAction) name:@"classroomLogout" object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(quitRoomAction) name:@"classroomQuit" object:nil];

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/Model/LoginHelper.m

@@ -87,9 +87,9 @@
             }
         });
     } failer:^(NSInteger code) {
-        if(self.delegate && [self.delegate respondsToSelector:@selector(classroomDidJoinFailRTC:)]){
-            [self.delegate classroomDidJoinFailRTC:@(code)];
-        }
+//        if(self.delegate && [self.delegate respondsToSelector:@selector(classroomDidJoinFailRTC:)]){
+//            [self.delegate classroomDidJoinFailRTC:@(code)];
+//        }
     }];
 }
 

+ 4 - 2
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/MainContainerView/VideoMaskView.m

@@ -9,12 +9,12 @@
 #import "VideoMaskView.h"
 #import "Masonry.h"
 #import "UIButton+EnlargeEdge.h"
+#import "TXRTCService.h"
 
 @interface VideoMaskView ()
 
 @property (nonatomic, strong) UIButton *dismissBtn;
 
-
 @property (nonatomic, strong) UIView *backView;
 
 @end
@@ -96,7 +96,9 @@
 
 - (UIImageView *)closeCameraView {
     if (!_closeCameraView) {
-        _closeCameraView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"video_close"]];
+        UIImage *img = [TRTC_MANAGER generalCloseImage];
+
+        _closeCameraView = [[UIImageView alloc] initWithImage:img];
         _closeCameraView.backgroundColor = [UIColor clearColor];
         _closeCameraView.contentMode = UIViewContentModeScaleAspectFill;
     }

+ 9 - 8
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/VideoList/KSBeatView.m

@@ -35,16 +35,12 @@
 
 
 - (void)createUI {
-    self.layer.shadowColor = [UIColor blackColor].CGColor;
-    self.layer.shadowOpacity = 1.0;
-    self.layer.shadowRadius = 5.0;
-    self.layer.shadowOffset = CGSizeMake(0, 3);
-    self.clipsToBounds = NO;
+
     UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.bounds), 1)];
     lineView.backgroundColor = HexRGB(0xf2f2f2);
     [self addSubview:lineView];
-    [self addSubview:self.typeLabel];
     [self addSubview:self.rateLabel];
+    [self addSubview:self.typeLabel];
     [self addSubview:self.bgView];
     [self updateSpotView:TXKSMetronomeType4V4 rate:90];
 }
@@ -64,6 +60,11 @@
     }else{
         spotNo = 6;
     }
+    UIImageView *currentImageView = [self viewWithTag:currentTotalNo % spotNo +100];
+    currentImageView.highlighted = YES;
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        currentImageView.highlighted = NO;
+    });
 }
 
 - (void)updateSpotView:(TXKSMetronomeType)metronomeStat rate:(NSInteger)rate {
@@ -246,7 +247,7 @@
 
 - (UILabel *)typeLabel {
     if (!_typeLabel) {
-        _typeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 5, CGRectGetWidth(self.bounds) / 2.0f, 25)];
+        _typeLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.bounds) / 2.0f, 5, CGRectGetWidth(self.bounds) / 2.0f, 25)];
         _typeLabel.textAlignment = NSTextAlignmentCenter;
         _typeLabel.font = [UIFont systemFontOfSize:13.0f weight:UIFontWeightMedium];
         _typeLabel.textColor = HexRGB(0x00B2A7);
@@ -256,7 +257,7 @@
 
 - (UILabel *)rateLabel {
     if (!_rateLabel) {
-        _rateLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.bounds) / 2.0f, 5, CGRectGetWidth(self.bounds) / 2.0f, 25)];
+        _rateLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 5, CGRectGetWidth(self.bounds) / 2.0f, 25)];
         _rateLabel.textAlignment = NSTextAlignmentCenter;
         _rateLabel.font = [UIFont systemFontOfSize:13.0f weight:UIFontWeightMedium];
         _rateLabel.textColor = HexRGB(0x00B2A7);

+ 18 - 2
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/View/VideoList/TXClassroomVideoListCell.m

@@ -10,6 +10,8 @@
 #import "ClassroomService.h"
 #import "LocalRenderManager.h"
 #import "TXRTCService.h"
+#import "TXClassroomVideoListView.h"
+#import "UIView+KSLayer.h"
 
 @interface TXClassroomVideoListCell ()
 
@@ -86,6 +88,20 @@
         make.right.mas_equalTo(self.videoView.mas_right);
     }];
     
+    // layer view
+    UIView *layerView = [[UIView alloc] init];
+    layerView.backgroundColor = [UIColor clearColor];
+    [self.contentView addSubview:layerView];
+    [layerView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.bottom.mas_equalTo(self.closeCameraView);
+        make.height.mas_equalTo(37);
+    }];
+    layerView.layer.cornerRadius = 10;
+    layerView.layer.maskedCorners = kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner;
+    layerView.clipsToBounds = YES;
+    CAGradientLayer *layer = [UIView createGradientLayerFromColor:HexRGBAlpha(0x000000, 0.0f) startPoint:CGPointMake(0.5, 0.1) endColor:HexRGBAlpha(0x000000, 0.7f) endPoint:CGPointMake(0.5, 1) bounds:CGRectMake(0, 0, VIDEO_WIDTH, 37)];
+    [layerView.layer addSublayer:layer];
+    
     // 添加信号图
     [self.contentView addSubview:self.qualityImage];
     [self.qualityImage mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -170,8 +186,6 @@
         }
         else {
             if (([member.userId isEqualToString:[ClassroomService sharedService].currentRoom.currentMemberId])) {
-                // 判断是否显示举手按钮
-                self.handView.hidden = !member.handUpOn;
                 self.roleView.hidden = NO;
                 self.roleView.backgroundColor = HexRGB(0xFE5219);
                 self.roleLabel.text = @"我";
@@ -185,6 +199,8 @@
                 self.videoView.hidden = NO;
                 
             }
+            // 判断是否显示举手按钮
+            self.handView.hidden = !member.handUpOn;
         }
         
         [self renderVideo:member];

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/TXLive/View/TXSeatContainerView.m

@@ -213,7 +213,7 @@
                     self.nameLabel.text = [result ks_stringValueForKey:@"friendNickname"];
                     [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[[result ks_stringValueForKey:@"friendAvatar"] getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
                     self.currentMember.userName = [result ks_stringValueForKey:@"friendNickname"];
-                    self.currentMember.imageUrl = [result ks_stringValueForKey:@"avatar"];
+                    self.currentMember.imageUrl = [result ks_stringValueForKey:@"friendAvatar"];
                 }
                 else {
                     NSLog(@"-delloc------");