This commit is contained in:
2026-01-27 16:28:17 +08:00
parent ce889e1ed0
commit 2b749cd2b0
26 changed files with 1092 additions and 128 deletions

View File

@@ -30,6 +30,7 @@ static const NSTimeInterval kTimestampInterval = 5 * 60; // 5 分钟
@property (nonatomic, strong) NSIndexPath *playingCellIndexPath;
@property (nonatomic, strong) AiVM *aiVM;
@property (nonatomic, assign) BOOL hasMoreData;
@property (nonatomic, assign) CGFloat contentBottomInset;
@end
@@ -78,11 +79,12 @@ static const NSTimeInterval kTimestampInterval = 5 * 60; // 5 分钟
//
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.edges.equalTo(self);
make.top.left.right.equalTo(self);
make.bottom.equalTo(self).offset(-KB_TABBAR_HEIGHT - 40 - 10);
make.edges.equalTo(self);
}];
self.contentBottomInset = KB_TABBAR_HEIGHT + 40 + 10;
[self updateContentBottomInset:self.contentBottomInset];
__weak typeof(self) weakSelf = self;
self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
__strong typeof(weakSelf) strongSelf = weakSelf;
@@ -207,6 +209,14 @@ static const NSTimeInterval kTimestampInterval = 5 * 60; // 5 分钟
[self updateFooterVisibility];
}
- (void)updateContentBottomInset:(CGFloat)bottomInset {
self.contentBottomInset = bottomInset;
UIEdgeInsets insets = self.tableView.contentInset;
insets.bottom = bottomInset;
self.tableView.contentInset = insets;
self.tableView.scrollIndicatorInsets = insets;
}
- (void)addMessage:(KBAiChatMessage *)message
autoScroll:(BOOL)autoScroll {
if (!message) {