|
@@ -61,7 +61,7 @@ typedef NS_ENUM(NSInteger, MICSTATUS) {
|
|
|
|
|
|
@property (nonatomic, strong) LiveRoomHeadView *headView;
|
|
|
|
|
|
-@property (nonatomic, copy) LiveRoomBottomView *bottomView;
|
|
|
+@property (nonatomic, strong) LiveRoomBottomView *bottomView;
|
|
|
|
|
|
// 视频主窗口容器
|
|
|
@property (nonatomic, strong) UIView *videoContainerView;
|
|
@@ -1539,7 +1539,6 @@ static int clickPraiseBtnTimes = 0;
|
|
|
MJWeakSelf;
|
|
|
self.closeAlert = [LiveRoomConfirmAlert liveroomAlertWithTitle:tipsMsg sureTitle:@"确定" inView:self.view confirm:^{
|
|
|
[weakSelf exitRoom];
|
|
|
- [weakSelf.navigationController dismissViewControllerAnimated:YES completion:nil];
|
|
|
}];
|
|
|
}
|
|
|
|
|
@@ -1691,7 +1690,9 @@ static int clickPraiseBtnTimes = 0;
|
|
|
|
|
|
- (void)kickOutLiveRoom {
|
|
|
[LOADING_MANAGER MBShowAUTOHidingInWindow:@"您已被踢出直播间"];
|
|
|
+ @weakObj(self);
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ @strongObj(self);
|
|
|
[self quitRoom];
|
|
|
});
|
|
|
}
|
|
@@ -1699,7 +1700,9 @@ static int clickPraiseBtnTimes = 0;
|
|
|
#pragma mark ------ message operation
|
|
|
- (void)resetConnectionStatus {
|
|
|
if (self.micStatus == MICSTATUS_CONNECTING) {
|
|
|
+ @weakObj(self);
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ @strongObj(self);
|
|
|
[self sendDownSeatMsg];
|
|
|
[self connectHostWithStatus:NO];
|
|
|
});
|
|
@@ -1915,17 +1918,16 @@ static int clickPraiseBtnTimes = 0;
|
|
|
|
|
|
if (self.landScape) {
|
|
|
[self changeOrientation:!self.landScape];
|
|
|
+ @weakObj(self);
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
-
|
|
|
+ @strongObj(self);
|
|
|
// 退出房间
|
|
|
[self exitRoom];
|
|
|
- [self.navigationController dismissViewControllerAnimated:YES completion:nil];
|
|
|
});
|
|
|
}
|
|
|
else {
|
|
|
// 退出房间
|
|
|
[self exitRoom];
|
|
|
- [self.navigationController dismissViewControllerAnimated:YES completion:nil];
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1955,6 +1957,7 @@ static int clickPraiseBtnTimes = 0;
|
|
|
if (_trtcCloud) {
|
|
|
[self.trtcCloud stopLocalAudio];
|
|
|
[self.trtcCloud exitRoom];
|
|
|
+ self.trtcCloud = nil;
|
|
|
}
|
|
|
}
|
|
|
TXLiveMessageLeave *leaveMsg = [[TXLiveMessageLeave alloc] init];
|
|
@@ -1964,6 +1967,7 @@ static int clickPraiseBtnTimes = 0;
|
|
|
// quit 接口
|
|
|
[weakSelf quitNotiferService];
|
|
|
[weakSelf quitChatRoom];
|
|
|
+ [weakSelf.navigationController dismissViewControllerAnimated:YES completion:nil];
|
|
|
}];
|
|
|
}
|
|
|
|
|
@@ -2255,11 +2259,10 @@ static int clickPraiseBtnTimes = 0;
|
|
|
}
|
|
|
|
|
|
- (void)refreshBottomChatStatus {
|
|
|
- if (self.bottomView) {
|
|
|
- NSString *tipsTitle = self.blacklistFlag ? @"您已被管理员禁言" : @"快来互动吧!";
|
|
|
- self.bottomView.tipsLabel.text = tipsTitle;
|
|
|
- self.bottomView.tipsLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
|
|
|
- }
|
|
|
+
|
|
|
+ NSString *tipsTitle = self.blacklistFlag ? @"您已被管理员禁言" : @"快来互动吧!";
|
|
|
+ self.bottomView.tipsLabel.text = tipsTitle;
|
|
|
+ self.bottomView.tipsLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2525,11 +2528,12 @@ static int clickPraiseBtnTimes = 0;
|
|
|
return;
|
|
|
}
|
|
|
NSTimeInterval currentTime = [[NSDate date] timeIntervalSince1970];
|
|
|
- __weak __typeof(&*self)weakSelf = self;
|
|
|
+ @weakObj(self);
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.21 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ @strongObj(self);
|
|
|
if ([[NSDate date] timeIntervalSince1970] - self.lastClickPraiseTime >= 0.2) {
|
|
|
|
|
|
- [weakSelf modifyLikeCount:clickPraiseBtnTimes];
|
|
|
+ [self modifyLikeCount:clickPraiseBtnTimes];
|
|
|
clickPraiseBtnTimes = 0;
|
|
|
}
|
|
|
});
|