处理评论数

This commit is contained in:
2026-01-29 14:51:42 +08:00
parent 32ebc6fb65
commit 07a77149fc
3 changed files with 5 additions and 3 deletions

View File

@@ -703,6 +703,9 @@ static NSString * const KBChatSessionDidResetNotification = @"KBChatSessionDidRe
KBAICommentView *customView = [[KBAICommentView alloc] KBAICommentView *customView = [[KBAICommentView alloc]
initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, customViewHeight)]; initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, customViewHeight)];
NSString *commentCount = self.persona.commentCount;
NSInteger totalCommentCount = [commentCount integerValue];;
customView.totalCommentCount = totalCommentCount;
// ID // ID
customView.companionId = self.persona.personaId; customView.companionId = self.persona.personaId;

View File

@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)loadComments; - (void)loadComments;
/// 评论总数 /// 评论总数
@property(nonatomic, readonly) NSInteger totalCommentCount; @property(nonatomic, assign) NSInteger totalCommentCount;
@property(nonatomic, weak) LSTPopView *popView @property(nonatomic, weak) LSTPopView *popView
; ;

View File

@@ -32,7 +32,6 @@ static NSString *const kCommentFooterIdentifier = @"CommentFooter";
@property(nonatomic, strong) KBAICommentInputView *inputView; @property(nonatomic, strong) KBAICommentInputView *inputView;
@property(nonatomic, strong) NSMutableArray<KBAICommentModel *> *comments; @property(nonatomic, strong) NSMutableArray<KBAICommentModel *> *comments;
@property(nonatomic, assign) NSInteger totalCommentCount;
/// ///
@property(nonatomic, assign) NSInteger currentPage; @property(nonatomic, assign) NSInteger currentPage;
@@ -274,7 +273,7 @@ static NSString *const kCommentFooterIdentifier = @"CommentFooter";
return; return;
} }
self.totalCommentCount = pageModel.total; // self.totalCommentCount = pageModel.total;
if (!append) { if (!append) {
[self.comments removeAllObjects]; [self.comments removeAllObjects];