| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- // Created by Tencent on 2023/06/09.
- // Copyright © 2023 Tencent. All rights reserved.
- /**
- *
- * This file declares the modules used to implement the conversation unit data source.
- * The conversation unit data source (hereinafter referred to as the "data source") contains a series of information and data required for the display of the
- * conversation unit, which will be described further below. The data source also contains some business logic, such as getting and generating message overview
- * (subTitle), updating conversation information (group message or user message update) and other logic.
- */
- #import <TIMCommon/TIMCommonModel.h>
- #import <TIMCommon/TIMDefine.h>
- NS_ASSUME_NONNULL_BEGIN
- typedef NS_ENUM(NSInteger, TUIConversationOnlineStatus) {
- TUIConversationOnlineStatusUnknown = 0,
- TUIConversationOnlineStatusOnline = 1,
- TUIConversationOnlineStatusOffline = 2,
- };
- /**
- *
- *
- * 【Module name】Conversation unit data source (TUIConversationCellData)
- * 【Function description】Store a series of information and data required by the conversation unit.
- * The conversation unit data source contains the following information and data:
- * 1. Conversation ID.
- * 2. Conversation type.
- * 3. Avatar URL and avatar image.
- * 4. Conversation title and information overview (subtitle).
- * 5. Conversation time (receive/send time of the latest message).
- * 6. Conversation unread count.
- * 7. Conversation top logo.
- * The data source also contains some business logic, such as getting and generating message overview (subTitle), updating conversation information (group
- * message or user message update) and other logic.
- */
- @interface TUIConversationCellData : TUICommonCellData
- @property(nonatomic, strong) NSString *conversationID;
- @property(nonatomic, strong) NSString *groupID;
- @property(nonatomic, strong) NSString *groupType;
- @property(nonatomic, strong) NSString *userID;
- @property(nonatomic, strong) NSString *title;
- @property(nonatomic, strong) NSString *faceUrl;
- @property(nonatomic, strong) UIImage *avatarImage;
- @property(nonatomic, strong) NSString *draftText;
- @property(nonatomic, assign) int unreadCount;
- @property (nonatomic, strong) NSString *headdress;//头饰链接
- @property (nonatomic, assign) double headgearType;//头饰 - 头饰类型(0=无资源文件,1=动态webp,2=SVGA,3=VAP)
- @property (nonatomic, strong) NSAttributedString *nameAttrString; // 头衔元素
- @property (nonatomic, assign) CGFloat nameAttWidth;//头衔元素所需要的宽度
- /**
- * Overview of conversation messages (sub title)
- * The overview is responsible for displaying the content/type of the latest message for the corresponding conversation.
- * When the latest message is a text message/system message, the content of the overview is the text content of the message
- * When the latest message is a multimedia message, the content of the overview is in the corresponding multimedia form, such as: "[Animation Expression]" /
- * "[File]" / "[Voice]" / "[Picture]" / "[Video]", etc. If there is a draft in the current conversation, the overview content is: "[Draft]XXXXX", where XXXXX is
- * the draft content.
- */
- @property(nonatomic, strong) NSMutableAttributedString *subTitle;
- /**
- * Group@ message tips string
- */
- @property(nonatomic, strong) NSString *atTipsStr;
- /**
- * Sequence list of group-at message
- */
- @property(nonatomic, strong) NSMutableArray<NSNumber *> *atMsgSeqs;
- /**
- *
- * The time of the latest message
- * Recording the receive/send time of the latest message in the conversation.
- */
- @property(nonatomic, strong) NSDate *time;
- /**
- *
- * The flag indicating whether the session is pinned
- * YES: Conversation is pinned; NO: Conversation not pinned
- */
- @property(nonatomic, assign) BOOL isOnTop;
- /**
- *
- * Indicates whether to display the message checkbox
- * In the conversation list, the message checkbox is not displayed by default.
- * In the message forwarding scenario, the list cell is multiplexed to the select conversation page. When the "Multiple Choice" button is clicked, the
- * conversation list becomes multi-selectable. YES: Multiple selection is enable, multiple selection views are displayed; NO: Multiple selection is disable, the
- * default view is displayed
- */
- @property(nonatomic, assign) BOOL showCheckBox;
- /**
- * Indicates whether the current message is disable selected, the default is NO
- */
- @property(nonatomic, assign) BOOL disableSelected;
- /**
- * Indicates whether the current message is selected, the default is NO
- */
- @property(nonatomic, assign) BOOL selected;
- /**
- * Indicates whether the cell is displayed in lite mode, the default is NO
- */
- @property(nonatomic, assign) BOOL isLiteMode;
- /**
- * Whether the current conversation is marked as do-not-disturb for new messages
- */
- @property(nonatomic, assign) BOOL isNotDisturb;
- /**
- * key by which to sort the conversation list
- */
- @property(nonatomic, assign) NSUInteger orderKey;
- /**
- * conversation group list
- */
- @property(nonatomic, strong) NSArray *conversationGroupList;
- /**
- * conversation mark list
- */
- @property(nonatomic, strong) NSArray *conversationMarkList;
- /**
- * The user's online status
- */
- @property(nonatomic, assign) TUIConversationOnlineStatus onlineStatus;
- /**
- * Conversation Mark - The current conversation is marked as unread
- */
- @property(nonatomic, assign) BOOL isMarkAsUnread;
- /**
- * Conversation Mark - The current conversation is marked as hidden
- */
- @property(nonatomic, assign) BOOL isMarkAsHide;
- /**
- * Conversation Mark - The current conversation is marked as folded
- */
- @property(nonatomic, assign) BOOL isMarkAsFolded;
- /**
- * Conversation Mark - Conversation folded, when there are folded conversations, a folded group will be generated locally to accommodate them, this tag is the
- * folded group tag
- */
- @property(nonatomic, assign) BOOL isLocalConversationFoldList;
- /**
- * Conversation collapsed subtitle: in the format "group name: last message"
- */
- @property(nonatomic, strong) NSMutableAttributedString *foldSubTitle;
- @property(nonatomic, strong) V2TIMMessage *lastMessage;
- @property(nonatomic, strong) V2TIMConversation *innerConversation;
- + (BOOL)isMarkedByHideType:(NSArray *)markList;
- + (BOOL)isMarkedByUnReadType:(NSArray *)markList;
- + (BOOL)isMarkedByFoldType:(NSArray *)markList;
- @end
- NS_ASSUME_NONNULL_END
|