Files
peko-ios/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.h

66 lines
1.9 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// YMRoomMessageView.h
// YUMI
//
// Created by YUMI on 2021/10/11.
//
#import <UIKit/UIKit.h>
#import "RoomHostDelegate.h"
#import "RoomGuestDelegate.h"
#import <JXCategoryView/JXCategoryListContainerView.h>
// DiffableDataSource 相关导入
#import "XPMessageItem.h"
#import "XPMessageDataSourceManager.h"
NS_ASSUME_NONNULL_BEGIN
@class XPRoomMessageContainerView, AttachmentModel, NIMBroadcastMessage;
@protocol XPRoomMessageContainerViewDelegate <NSObject>
- (void)xPRoomMessageContainerViewlDidTapEmpty:(XPRoomMessageContainerView *)view;
@end
@interface XPRoomMessageContainerView : UIView<RoomGuestDelegate,JXCategoryListContentViewDelegate>
@property(nonatomic,weak) id<XPRoomMessageContainerViewDelegate>delegate;
- (void)showUserCard:(NSInteger)uid;
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
- (void)changeType:(NSInteger)type;
- (void)handleBroadcastMessageAttachment:(AttachmentModel *)attachment;
- (void)handleBroadcastMessage:(NIMBroadcastMessage *)message;
#pragma mark - DiffableDataSource Support
/// 是否使用 DiffableDataSource开关控制
@property (nonatomic, assign) BOOL useDiffableDataSource;
/// DiffableDataSource 数据源
@property (nonatomic, strong) UITableViewDiffableDataSource<NSString *, XPMessageItem *> *diffableDataSource;
/// 数据源管理器
@property (nonatomic, strong) XPMessageDataSourceManager *dataSourceManager;
/// 设置 DiffableDataSource
- (void)setupDiffableDataSource;
/// 使用 DiffableDataSource 添加消息
- (void)addMessageWithDiffableDataSource:(NIMMessage *)message;
/// 使用 DiffableDataSource 切换显示类型
- (void)changeTypeWithDiffableDataSource:(NSInteger)type;
/// 使用 DiffableDataSource 滚动到底部
- (void)scrollToBottomWithDiffableDataSource:(BOOL)animated;
/// 更新 DiffableDataSource 快照
- (void)updateDiffableDataSourceSnapshot;
@end
NS_ASSUME_NONNULL_END