Commit 119c6b6fa01355350120920d4c3ada8ed0d104b6
1 parent
71d056a9
退出后 清空礼物和聊天数据
Showing
8 changed files
with
33 additions
and
7 deletions
LiveVideoCloud/Classes/Sections/InteractionSections/Gift/AnimQueueManager.h
| @@ -26,4 +26,6 @@ | @@ -26,4 +26,6 @@ | ||
| 26 | */ | 26 | */ |
| 27 | - (void)addAnimationWithModel:(GiftModel *)model animContentView:(UIView *)animContentView; | 27 | - (void)addAnimationWithModel:(GiftModel *)model animContentView:(UIView *)animContentView; |
| 28 | 28 | ||
| 29 | +- (void)cancelAllGiftOperations; | ||
| 30 | + | ||
| 29 | @end | 31 | @end |
LiveVideoCloud/Classes/Sections/InteractionSections/Gift/AnimQueueManager.m
LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftViews/GiftListView.h
| @@ -28,4 +28,6 @@ | @@ -28,4 +28,6 @@ | ||
| 28 | - (GiftStyle)giftStyleWithTag:(NSInteger)tag; | 28 | - (GiftStyle)giftStyleWithTag:(NSInteger)tag; |
| 29 | 29 | ||
| 30 | - (NSInteger)recGiftIndexFromGiftName:(NSString *_Nonnull)giftName; | 30 | - (NSInteger)recGiftIndexFromGiftName:(NSString *_Nonnull)giftName; |
| 31 | + | ||
| 32 | +- (void)cancelAllGiftAnimations; | ||
| 31 | @end | 33 | @end |
LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftViews/GiftListView.m
| @@ -235,6 +235,11 @@ | @@ -235,6 +235,11 @@ | ||
| 235 | return index; | 235 | return index; |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | +- (void)cancelAllGiftAnimations | ||
| 239 | +{ | ||
| 240 | + [self.animQueueManager cancelAllGiftOperations]; | ||
| 241 | +} | ||
| 242 | + | ||
| 238 | #pragma mark - getter | 243 | #pragma mark - getter |
| 239 | 244 | ||
| 240 | - (NSArray *)giftArray | 245 | - (NSArray *)giftArray |
LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.h
| @@ -35,5 +35,9 @@ typedef NS_ENUM(NSInteger, JumpControllerType) {//跳转控制器类型 | @@ -35,5 +35,9 @@ typedef NS_ENUM(NSInteger, JumpControllerType) {//跳转控制器类型 | ||
| 35 | 35 | ||
| 36 | - (void)bounceBtnType:(BounceBtnType)btnType model:(userInfoModel *_Nonnull)model; | 36 | - (void)bounceBtnType:(BounceBtnType)btnType model:(userInfoModel *_Nonnull)model; |
| 37 | 37 | ||
| 38 | -- (void)clearChatListData; | 38 | +- (void)clearChatAndGiftData; |
| 39 | + | ||
| 40 | +//- (void)clearChatListData; | ||
| 41 | +// | ||
| 42 | +//- (void)clearGiftData; | ||
| 39 | @end | 43 | @end |
LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.m
| @@ -195,15 +195,21 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 | @@ -195,15 +195,21 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 | ||
| 195 | [_commentText becomeFirstResponder];//再次让textView成为第一响应者 | 195 | [_commentText becomeFirstResponder];//再次让textView成为第一响应者 |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | +- (void)clearChatAndGiftData | ||
| 199 | +{ | ||
| 200 | + [self clearChatListData]; | ||
| 201 | + [self clearGiftData]; | ||
| 202 | +} | ||
| 203 | + | ||
| 198 | - (void)clearChatListData | 204 | - (void)clearChatListData |
| 199 | { | 205 | { |
| 200 | [self.chatMsgArray removeAllObjects]; | 206 | [self.chatMsgArray removeAllObjects]; |
| 201 | [self.chatTableView reloadData]; | 207 | [self.chatTableView reloadData]; |
| 202 | - | ||
| 203 | -// self.chatTableView = nil; | ||
| 204 | -// self.presentView = nil; | ||
| 205 | -//// self.giftPopView = nil; | ||
| 206 | -// self.barrageView = nil; | 208 | +} |
| 209 | + | ||
| 210 | +- (void)clearGiftData | ||
| 211 | +{ | ||
| 212 | + [self.giftListView cancelAllGiftAnimations]; | ||
| 207 | } | 213 | } |
| 208 | 214 | ||
| 209 | #pragma mark - UITextFieldDelegate | 215 | #pragma mark - UITextFieldDelegate |
LiveVideoCloud/Classes/Sections/LiveSections/Controller/LVCLiveViewController.m
| @@ -322,6 +322,7 @@ | @@ -322,6 +322,7 @@ | ||
| 322 | if (_kitCN.streamState == CNLiveStreamStateConnected) { | 322 | if (_kitCN.streamState == CNLiveStreamStateConnected) { |
| 323 | [_kitCN stopStream]; | 323 | [_kitCN stopStream]; |
| 324 | } | 324 | } |
| 325 | + [_liveBaseView clearChatAndGiftData]; | ||
| 325 | [self dismissViewControllerAnimated:YES completion:nil]; | 326 | [self dismissViewControllerAnimated:YES completion:nil]; |
| 326 | } | 327 | } |
| 327 | 328 |
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LVCUGCLivePlayerController.m
| @@ -130,7 +130,7 @@ | @@ -130,7 +130,7 @@ | ||
| 130 | NSLog(@"quit Failure"); | 130 | NSLog(@"quit Failure"); |
| 131 | }]; | 131 | }]; |
| 132 | 132 | ||
| 133 | - [_liveBaseView clearChatListData]; | 133 | + [_liveBaseView clearChatAndGiftData]; |
| 134 | 134 | ||
| 135 | for (UIViewController *controller in self.navigationController.viewControllers) { | 135 | for (UIViewController *controller in self.navigationController.viewControllers) { |
| 136 | if ([controller isKindOfClass:[MineLiveController class]]) { | 136 | if ([controller isKindOfClass:[MineLiveController class]]) { |