首页直播中动效

This commit is contained in:
chenshuanglin
2023-03-13 19:50:02 +08:00
parent a147c43450
commit 4463b2f551
9 changed files with 128 additions and 25 deletions

View File

@@ -19,13 +19,14 @@
///VC
#import "XPWebViewController.h"
#import "XPRoomViewController.h"
#import "SessionViewController.h"
///Model
#import "HomeRecommendRoomModel.h"
///P
#import "XPHomePresenter.h"
#import "XPHomeProtocol.h"
@interface XPFindNewFriendViewController ()<UITableViewDelegate, UITableViewDataSource, XPHomeBannerTableViewCellDelegate, XPHomeProtocol>
@interface XPFindNewFriendViewController ()<UITableViewDelegate, UITableViewDataSource, XPHomeBannerTableViewCellDelegate, XPHomeProtocol, XPFindNewFriendTableViewCellDelegate>
///
@property (nonatomic,strong) UITableView *tableView;
@property (nonatomic, copy) void(^scrollCallback)(UIScrollView *scrollView);
@@ -110,6 +111,10 @@
}];
}
#pragma mark - XPFindNewFriendTableViewCellDelegate
#pragma mark - XPHomeProtocol
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list state:(BOOL)state {
if (state == 0) {
@@ -153,10 +158,8 @@
if (self.dataSource.count > 0) {
HomeRecommendRoomModel * model = [self.dataSource safeObjectAtIndex1:indexPath.row];
XPFindNewFriendTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPFindNewFriendTableViewCell class])];
if (cell == nil) {
cell = [[XPFindNewFriendTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPFindNewFriendTableViewCell class])];
}
cell.roomInfo = model;
cell.delegate = self;
return cell;
}
XPHomeListEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeListEmptyTableViewCell class])];
@@ -170,9 +173,15 @@
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (self.dataSource.count > 0) {
HomeRecommendRoomModel * model = [self.dataSource safeObjectAtIndex1:indexPath.row];
if (model.uid.integerValue > 0) {
if (model.roomUid.integerValue > 0) {
[XPRoomViewController openRoom:model.uid fromNick:model.title fromType:UserEnterRoomFromType_Home_Recommend fromUid:nil viewController:self];
}
///
// NSString * sessionId = [NSString stringWithFormat:@"%@",model.uid];
// NIMSession * session = [NIMSession session:sessionId type:NIMSessionTypeP2P];
// SessionViewController * sessionVC = [[SessionViewController alloc] initWithSession:session];
// [self.navigationController pushViewController:sessionVC animated:YES];
}
}