房间内私聊

This commit is contained in:
fengshuo
2022-05-29 19:07:08 +08:00
parent ba5bcb4242
commit 7b097735c6
28 changed files with 588 additions and 37 deletions

View File

@@ -41,7 +41,7 @@
}
- (BOOL)isHiddenNavBar {
return self.openType == SessionListOpenTypeDefault;
return YES;
}
- (instancetype)initWithType:(SessionListOpenType)type {
@@ -73,7 +73,7 @@
- (void)initViews {
self.title = @"消息";
if ([self isHiddenNavBar]) {
if (self.openType == SessionListOpenTypeDefault) {
[self.customNavigationBar addSubview:self.titleLabel];
[self.view addSubview:self.customNavigationBar];
}
@@ -81,7 +81,7 @@
}
- (void)initLayout {
if ([self isHiddenNavBar]) {
if (self.openType == SessionListOpenTypeDefault) {
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(self.customNavigationBar);
}];
@@ -89,7 +89,7 @@
[self.sessionListView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self.view);
if ([self isHiddenNavBar]) {
if (self.openType == SessionListOpenTypeDefault) {
make.top.mas_equalTo(self.customNavigationBar.mas_bottom);
} else {
make.top.mas_equalTo(self.view);
@@ -126,6 +126,7 @@
[tableView deselectRowAtIndexPath:indexPath animated:YES];
NIMRecentSession *recentSession = self.recentSessions[indexPath.row];
SessionViewController *vc = [[SessionViewController alloc] initWithSession:recentSession.session];
vc.openType = self.openType;
[self.navigationController pushViewController:vc animated:YES];
}
@@ -223,6 +224,11 @@
}
}
#pragma mark - JXCategoryListContentViewDelegate
- (UIView *)listView {
return self.view;
}
#pragma mark - Private
- (NSInteger)findInsertPlace:(NIMRecentSession *)recentSession{
__block NSUInteger matchIdx = 0;