// // YOUPAIHRChatRoomCurrentAudienceVC.m // VQU // // Created by xiaohaoran on 2021/11/3. // Copyright © 2021 MS. All rights reserved. // #import "YOUPAIHRChatRoomCurrentAudienceVC.h" #import "UIScrollView+LZRefresh.h" #import "YOUPAILZChatRoomInviationUpSeatCell.h" @interface YOUPAIHRChatRoomCurrentAudienceVC () @property (nonatomic, weak) UITableView *youpaiptableView; @property (nonatomic, strong) NSString *youpaipendTime; @property (nonatomic, strong) NSMutableArray *youpaipdataSource; @end @implementation YOUPAIHRChatRoomCurrentAudienceVC - (void)dealloc{ [[NSNotificationCenter defaultCenter] removeObserver:self]; } - (void)viewDidLoad { [super viewDidLoad]; [self youpaifinitUI]; /// 关注状态改变,接收通知 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youpaifchangeFollowStateNotification:) name:@"ChangeFollowState" object:nil]; [self youpaifrequestOnlineListWithStatus:kRefreshNormal]; } - (void)youpaifchangeFollowStateNotification:(NSNotification *)notification{ NSDictionary *dict = [notification userInfo]; NSString *idStr = dict[@"follow_uid"]; NSInteger isfollow = [dict[@"is_follow"] intValue]; NSArray *arr = self.youpaipdataSource; NSMutableArray *arrM = [NSMutableArray new]; if (arr.count>0) { for (int i = 0; i*list = [YOUPAILZChatRoomMemberModel mj_objectArrayWithKeyValuesArray:[data objectForKey:@"list"]]; [self.youpaipdataSource addObjectsFromArray:list]; [self.youpaiptableView reloadData]; self.youpaipendTime = [data objectForKey:@"end_time"]; [self youpaifrefreshFooterWithHidden:NO]; } } failure:^(NSError *error) { @strongify(self); [self.youpaiptableView endRefreshing:kRefreshAll]; }]; } - (NSMutableArray *)youpaipdataSource{ if (!_youpaipdataSource) { _youpaipdataSource = [NSMutableArray array]; } return _youpaipdataSource; } #pragma mark - JXCategoryListContentViewDelegate - (UIView *)listView{ return self.view; } @end