TUIConversationCell.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // Created by Tencent on 2023/06/09.
  2. // Copyright © 2023 Tencent. All rights reserved.
  3. #import <TIMCommon/TIMCommonModel.h>
  4. #import "TUIConversationCellData.h"
  5. NS_ASSUME_NONNULL_BEGIN
  6. /**
  7. *
  8. * [Function description] In the message list interface, display the preview information of a single conversation.
  9. * The session information displayed in the session unit includes:
  10. * 1. Avatar information (user avatar/group avatar)
  11. * 2. Session title (user nickname/group name)
  12. * 3. Conversation message overview (displays the latest message content)
  13. * 4. Number of unread messages (if there are unread messages)
  14. * 5. Session time (receipt/sent time of the latest message)
  15. */
  16. @interface TUIConversationCell : UITableViewCell
  17. /**
  18. * Image view for displaying avatar
  19. * When conversation type is one-to-one, the image view will display user's avatar
  20. * When conversation type is group chat, the image view will display group's avatar
  21. */
  22. @property(nonatomic, strong) UIImageView *headImageView;
  23. /**
  24. * Title of conversation
  25. * When conversation type is one-to-one, the title is the friend's remarks, and if the corresponding friend has no remarks, the friend's ID is displayed.
  26. * When the conversation is a group chat, the title is the group name.
  27. */
  28. @property(nonatomic, strong) UILabel *titleLabel;
  29. /**
  30. * Overview of conversation messages (sub title)
  31. * The overview is responsible for displaying the content/type of the latest message for the corresponding conversation.
  32. * When the latest message is a text message/system message, the content of the overview is the text content of the message
  33. * When the latest message is a multimedia message, the content of the overview is in the corresponding multimedia form, such as: "[Animation Expression]" /
  34. * "[File]" / "[Voice]" / "[Picture]" / "[Video]", etc. If there is a draft in the current conversation, the overview content is: "[Draft]XXXXX", where XXXXX is
  35. * the draft content.
  36. */
  37. @property(nonatomic, strong) UILabel *subTitleLabel;
  38. /**
  39. * The label for displaying time
  40. * Responsible for displaying the received/sent time of the latest message in the conversation unit.
  41. */
  42. @property(nonatomic, strong) UILabel *timeLabel;
  43. /**
  44. * The red dot view that identifies whether the current conversation is set to do not disturb
  45. */
  46. @property(nonatomic, strong) UIView *notDisturbRedDot;
  47. /**
  48. * The image view that identifies whether the current conversation is set to do not disturb
  49. */
  50. @property(nonatomic, strong) UIImageView *notDisturbView;
  51. /**
  52. * A view indicating whether the current conversation has unread messages
  53. * If the current conversation has unread messages, the unread count is displayed to the right of the conversation unit.
  54. */
  55. @property(nonatomic, strong) TUIUnReadView *unReadView;
  56. /**
  57. * Icon indicating whether the conversation is selected
  58. * In the multi-selection scenario, it is used to identify whether the conversation is selected
  59. */
  60. @property(nonatomic, strong) UIImageView *selectedIcon;
  61. /**
  62. * The icon of the user's online status
  63. */
  64. @property(nonatomic, strong) UIImageView *onlineStatusIcon;
  65. @property(nonatomic, strong) UIImageView *lastMessageStatusImageView;
  66. @property(atomic, strong) TUIConversationCellData *convData;
  67. - (void)fillWithData:(TUIConversationCellData *)convData;
  68. + (NSString *)convertDateTwoToStr:(NSDate *)date;//列表日期格式
  69. @end
  70. NS_ASSUME_NONNULL_END