Sfoglia il codice sorgente

消息显示问题修复

Steven 2 anni fa
parent
commit
f709bc351d

BIN
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 208 - 0
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -532,5 +532,213 @@
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "A31AD81B-9011-41C6-B3A4-1805C49B8634"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "204"
+            endingLineNumber = "204"
+            landmarkName = "-updateUI:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "E9BBCBFD-5DE2-4845-8C26-32B22A2803F9"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1422"
+            endingLineNumber = "1422"
+            landmarkName = "-didReceiveMessageNotification:"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "E9BBCBFD-5DE2-4845-8C26-32B22A2803F9 - 37facbaa101c8592"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[LiveVideoRoomViewController didReceiveMessageNotification:]"
+                  moduleName = "KulexiuForStudent"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/Klx_student/KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1428"
+                  endingLineNumber = "1428"
+                  offsetFromSymbolStart = "1184">
+               </Location>
+               <Location
+                  uuid = "E9BBCBFD-5DE2-4845-8C26-32B22A2803F9 - 37facbaa101c8592"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[LiveVideoRoomViewController didReceiveMessageNotification:]"
+                  moduleName = "KulexiuForStudent"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/Klx_student/KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1428"
+                  endingLineNumber = "1428"
+                  offsetFromSymbolStart = "1188">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "303FBC4E-6683-4D6A-932A-23F06B6B0830"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "74"
+            endingLineNumber = "74"
+            landmarkName = "-updateUI:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "2EBF0C0D-BC6A-44E0-8B45-75E85CFC0D6E"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "171"
+            endingLineNumber = "171"
+            landmarkName = "-updateUI:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "4DE6FF37-60FE-4565-AF84-05AD05738752"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "69"
+            endingLineNumber = "69"
+            landmarkName = "-updateUI:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "235E0E64-63AA-4FBA-A6E2-F2B922AE8D75"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "62"
+            endingLineNumber = "62"
+            landmarkName = "-setDataModel:createrId:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "94A12614-714B-4C8E-91EE-4B41E2838320"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1414"
+            endingLineNumber = "1414"
+            landmarkName = "-didReceiveMessageNotification:"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "94A12614-714B-4C8E-91EE-4B41E2838320 - 37facbaa101c8592"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[LiveVideoRoomViewController didReceiveMessageNotification:]"
+                  moduleName = "KulexiuForStudent"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/Klx_student/KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1428"
+                  endingLineNumber = "1428"
+                  offsetFromSymbolStart = "1184">
+               </Location>
+               <Location
+                  uuid = "94A12614-714B-4C8E-91EE-4B41E2838320 - 37facbaa101c8592"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[LiveVideoRoomViewController didReceiveMessageNotification:]"
+                  moduleName = "KulexiuForStudent"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/Klx_student/KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1428"
+                  endingLineNumber = "1428"
+                  offsetFromSymbolStart = "1188">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C6CEC3A8-2EB0-4A76-9DA2-62B4E4B95D74"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1099"
+            endingLineNumber = "1099"
+            landmarkName = "-insertMessage:userInfo:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "00091328-271D-4E22-9152-D56E67E3B43E"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1508"
+            endingLineNumber = "1508"
+            landmarkName = "-appendAndDisplayMessage:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/seating_image.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/seating_image.imageset/seating_image@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/seating_image.imageset/seating_image@3x.png


+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController.m

@@ -38,7 +38,7 @@
             UIWindow *window = [[UIApplication sharedApplication ] keyWindow];
             if (!self->t_MBProgressHUD ) {
                 self->t_MBProgressHUD = [window addHUDActivityViewToView:nil
-                                                               HintsText:nil
+                                                               HintsText:@"加载中..."
                                                                    Image:nil
                                                           hideAfterDelay:200.0f
                                                                  HaveDim:NO];
@@ -49,7 +49,7 @@
                 
                 [self->t_MBProgressHUD hideAnimated:YES afterDelay:0.0];
                 self->t_MBProgressHUD = [window addHUDActivityViewToView:nil
-                                                               HintsText:nil
+                                                               HintsText:@"加载中..."
                                                                    Image:nil
                                                           hideAfterDelay:200.0f
                                                                  HaveDim:NO];

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/View/CourseForLiveCell.m

@@ -43,7 +43,7 @@
     
     self.courseName.text = [NSString returnNoNullStringWithString:model.name];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
-    self.descLabel.text = [NSString stringWithFormat:@"%@人已购买", model.payCount];
+    self.descLabel.text = [NSString stringWithFormat:@"%@人", model.payCount];
     if ([model.status isEqualToString:@"NOT_START"]) { // 未开始
         self.courseStatusLabel.text = @"未开始";
         self.courseStatusLabel.textColor = HexRGB(0xff802C);

+ 11 - 1
KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m

@@ -1318,6 +1318,7 @@ static int clickPraiseBtnTimes  = 0;
                     RCChatroomSeatsControl *seatControlMessage = (RCChatroomSeatsControl *)rcMessage.content;
                     if (seatControlMessage.seatBan) { // 禁止连麦
                         __blockSelf.enableSeat = NO;
+                        __blockSelf.micStatus = MICSTATUS_NOMAL;
                     }
                     else { // 开启连麦
                         __blockSelf.enableSeat = YES;
@@ -1360,6 +1361,7 @@ static int clickPraiseBtnTimes  = 0;
                         [__blockSelf MBPShow:@"主讲人拒绝了您的连麦申请"];
                         __blockSelf.micStatus = MICSTATUS_NOMAL;
                     }
+                    [__blockSelf insertMessage:rcMessage userInfo:notification.userInfo];
                 }
                 else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomDownSeat class]]) { // 成员下麦消息
                     return;
@@ -1409,6 +1411,7 @@ static int clickPraiseBtnTimes  = 0;
                 else if ([rcMessage.content isMemberOfClass:[KSDownSeatAllMessage class]]) { // 所有麦上用户下麦
                     if (__blockSelf.micStatus == MICSTATUS_CONNECTING) {
                         [__blockSelf kickSeatWithMessage:@"您已被抱下麦"];
+                        [__blockSelf insertMessage:rcMessage userInfo:notification.userInfo];
                     }
                 }
                 else if ([rcMessage.content isMemberOfClass:[KSRejectAllSeatMessage class]]) { // 拒绝所有连麦申请
@@ -1416,6 +1419,7 @@ static int clickPraiseBtnTimes  = 0;
                         [__blockSelf MBPShow:@"主讲人拒绝了您的连麦申请"];
                         // 处理连麦状态
                         __blockSelf.micStatus = MICSTATUS_NOMAL;
+                        [__blockSelf insertMessage:rcMessage userInfo:notification.userInfo];
                     }
                 }
                 
@@ -1604,7 +1608,7 @@ static int clickPraiseBtnTimes  = 0;
     if(!cell){
         cell = [[KSChatroomTextCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KSChatroomTextCell"];
     }
-    if ([messageContent isMemberOfClass:[RCTextMessage class]] || [messageContent isMemberOfClass:[KSLiveChatroomWelcome class]] || [messageContent isMemberOfClass:[KSLiveChatroomLike class]] || [messageContent isMemberOfClass:[KSLiveChatroomSeatApply class]] || [messageContent isMemberOfClass:[KSLiveChatroomSeatResponse class]]){
+    if ([messageContent isMemberOfClass:[RCTextMessage class]] || [messageContent isMemberOfClass:[KSLiveChatroomWelcome class]] || [messageContent isMemberOfClass:[KSLiveChatroomLike class]] || [messageContent isMemberOfClass:[KSLiveChatroomSeatApply class]] || [messageContent isMemberOfClass:[KSLiveChatroomSeatResponse class]] || [messageContent isMemberOfClass:[KSDownSeatAllMessage class]] || [messageContent isMemberOfClass:[KSRejectAllSeatMessage class]] || [messageContent isMemberOfClass:[RCChatroomSeatsControl class]]){
         [cell setDataModel:model createrId:self.createrId];
     }
     return cell;
@@ -1622,6 +1626,8 @@ static int clickPraiseBtnTimes  = 0;
     applyMessage.audienceId = UserDefault(UIDKey);
     applyMessage.audienceName = UserDefault(NicknameKey);
     applyMessage.audienceAvatar = UserDefault(AvatarUrlKey);
+    applyMessage.teacherId = self.createrId;
+    applyMessage.teacherName = self.createrName;
     MJWeakSelf;
     [self sendMessage:applyMessage displayMessage:YES callback:^(BOOL success) {
         if (success) {
@@ -1687,6 +1693,10 @@ static int clickPraiseBtnTimes  = 0;
             }
                 break;
             case MICSTATUS_WAITING:
+            {
+                [self.bottomView.seatButton setImage:[UIImage imageNamed:@"seating_image"] forState:UIControlStateNormal];
+            }
+                break;
             case MICSTATUS_CONNECTING:
             {
                 [self.bottomView.seatButton setImage:[UIImage imageNamed:@"seat_image"] forState:UIControlStateNormal];

+ 48 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m

@@ -167,6 +167,54 @@
         [self.contentLabel setAttributedText:attributedString.copy];
         return;
     }
+    else if ([model.content isMemberOfClass:[RCChatroomSeatsControl class]]) {
+        RCChatroomSeatsControl *seatControlMessage = (RCChatroomSeatsControl *)model.content;
+        NSString *userName = [seatControlMessage.userName stringByAppendingString:@""];
+        
+        NSString *localizedMessage = seatControlMessage.seatBan ? @"关闭连麦" : @"开启连麦";
+        NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
+        NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
+        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0x00FFF0)) range:[str rangeOfString:userName]];
+        
+        NSMutableAttributedString *descString = [[NSMutableAttributedString alloc] initWithString:localizedMessage];
+        [descString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[localizedMessage rangeOfString:localizedMessage]];
+        [attributedString appendAttributedString:descString];
+        
+        if (isCreator) {
+            [self addAttachmentImg:attributedString imgName:creatorImg];
+        }
+        [self.contentLabel setAttributedText:attributedString.copy];
+    }
+    else if ([model.content isMemberOfClass:[KSDownSeatAllMessage class]]) { // 所有麦上用户下麦
+        RCUserInfo *userInfo = model.userInfo;
+        NSString *userName = userInfo.name;
+        NSString *localizedMessage = @"";
+        localizedMessage = @"将你抱下麦";
+        NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
+        NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
+        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0x00FFF0)) range:[str rangeOfString:userName]];
+        
+        NSMutableAttributedString *descString = [[NSMutableAttributedString alloc] initWithString:localizedMessage];
+        [descString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[localizedMessage rangeOfString:localizedMessage]];
+        [attributedString appendAttributedString:descString];
+        [self addAttachmentImg:attributedString imgName:creatorImg];
+        [self.contentLabel setAttributedText:attributedString.copy];
+    }
+    else if ([model.content isMemberOfClass:[KSRejectAllSeatMessage class]]) { // 拒绝所有连麦申请
+        RCUserInfo *userInfo = model.userInfo;
+        NSString *userName = userInfo.name;
+        NSString *localizedMessage = @"";
+        localizedMessage = @"拒绝了连麦申请";
+        NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
+        NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
+        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0x00FFF0)) range:[str rangeOfString:userName]];
+        
+        NSMutableAttributedString *descString = [[NSMutableAttributedString alloc] initWithString:localizedMessage];
+        [descString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[localizedMessage rangeOfString:localizedMessage]];
+        [attributedString appendAttributedString:descString];
+        [self addAttachmentImg:attributedString imgName:creatorImg];
+        [self.contentLabel setAttributedText:attributedString.copy];
+    }
     else if ([model.content isMemberOfClass:[RCTextMessage class]]) {
         
         RCTextMessage *textMessage = (RCTextMessage *)self.model.content;

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyVideoCourseBodyView.m

@@ -201,8 +201,8 @@
     VideoCourseCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"VideoCourseCell" forIndexPath:indexPath];
     
     VideoCourseModel *model = [self.dataArray objectAtIndex:indexPath.row];
-    BOOL isCheck = self.selectIndex != 0;
-    [cell configSourceModel:model isInCheck:isCheck];
+//    BOOL isCheck = self.selectIndex != 0;
+    [cell configSourceModel:model isInCheck:NO];
     return cell;
 }
 

+ 7 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/VideoCourseCell.m

@@ -56,7 +56,13 @@
     }
     else {
         self.descView.hidden = NO;
-        self.descLabel.text = [NSString stringWithFormat:@"%.0f人已购买",model.countStudent];
+        if (model.lessonPrice > 0) {
+            self.descLabel.text = [NSString stringWithFormat:@"%.0f人已购买",model.countStudent];
+        }
+        else {
+            self.descLabel.text = [NSString stringWithFormat:@"%.0f人已领取",model.countStudent];
+
+        }
     }
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.lessonSubjectName];
 }