个播房背景显示优化,退房后停掉关注主播定时器
This commit is contained in:
@@ -46,6 +46,13 @@
|
||||
@end
|
||||
|
||||
@implementation XPRoomFunctionContainerView
|
||||
|
||||
- (void)dealloc {
|
||||
if (self.followAnchorTimer != nil) {
|
||||
dispatch_source_cancel(self.followAnchorTimer);
|
||||
}
|
||||
}
|
||||
|
||||
- (instancetype)initWithdelegate:(id<RoomHostDelegate>)delegate {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
@@ -229,7 +236,10 @@
|
||||
dispatch_source_set_event_handler(self.followAnchorTimer, ^{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@strongify(self);
|
||||
dispatch_source_cancel(self.followAnchorTimer);
|
||||
if (self.followAnchorTimer != nil) {
|
||||
dispatch_source_cancel(self.followAnchorTimer);
|
||||
self.followAnchorTimer = nil;
|
||||
}
|
||||
RoomInfoModel* roomInfo = self.delegate.getRoomInfo;
|
||||
NSString *roomUid = [NSString stringWithFormat:@"%zd", roomInfo.uid];
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
|
Reference in New Issue
Block a user