DynamicDetailView.h 1.3 KB
//
//  DynamicDetailView.h
//  DreamSleep
//
//  Created by peter on 2022/9/26.
//

#import <UIKit/UIKit.h>
#import "ComDynModel.h"

NS_ASSUME_NONNULL_BEGIN

@protocol DynamicDetailViewDelegate <NSObject>
/// 评论或者回复回调
/// @param tag tag
/// @param content 内容
- (void)fireCommentOrReply:(NSInteger)tag content:(NSString *)content;

/// 进入回复列表页
/// @param commentID 评论id
- (void)jumpReplyListView:(int)commentID;

/// 评论详情点赞回调
- (void)fireTapDetailLikeBtn;
@end

/// 动态详情自定义view
@interface DynamicDetailView : UIView
@property (nonatomic, weak) id<DynamicDetailViewDelegate> delegate;
- (instancetype)initWithDelegate:(id<DynamicDetailViewDelegate>)delegate;

/// 更新评论框点赞和回复数
/// @param model 社区动态列表传递过来的model
- (void)updateBottomView:(ComDynModel *)model;

/// 更新点赞状态和点赞数
/// @param model model
- (void)updateLikeStateAndLikeCount:(ComDynModel *)model;

/// 更新评论数
/// @param remarkCount remarkCount
- (void)updateRemarkCount:(int)remarkCount;

/// 更新动态详情页面
/// @param groupData 分组数据
- (void)updateDetailView:(NSArray *)groupData;

/// 更新评论区
/// @param groupData 分组数据
- (void)updateCommentSection:(NSArray *)groupData;
@end

NS_ASSUME_NONNULL_END