ChatTableViewCell.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: GPL-3.0-or-later
  4. */
  5. #import <UIKit/UIKit.h>
  6. #import "DRCellSlideGestureRecognizer.h"
  7. #import "NCChatMessage.h"
  8. static CGFloat kChatCellStatusViewHeight = 20.0;
  9. static CGFloat kChatCellDateLabelWidth = 40.0;
  10. static CGFloat kChatCellAvatarHeight = 30.0;
  11. typedef NS_ENUM(NSInteger, ChatMessageDeliveryState) {
  12. ChatMessageDeliveryStateSent = 0,
  13. ChatMessageDeliveryStateRead,
  14. ChatMessageDeliveryStateSending,
  15. ChatMessageDeliveryStateDeleting,
  16. ChatMessageDeliveryStateFailed,
  17. ChatMessageDeliveryStateSilent
  18. };
  19. @protocol ChatTableViewCellDelegate <NSObject>
  20. - (void)cellDidSelectedReaction:(NCChatReaction *)reaction forMessage:(NCChatMessage *)message;
  21. - (void)cellWantsToReplyToMessage:(NCChatMessage *)message;
  22. @end
  23. @interface ChatTableViewCell : UITableViewCell
  24. @property (nonatomic, assign) NSInteger messageId;
  25. @property (nonatomic, strong) NCChatMessage *message;
  26. - (UIMenu *)getDeferredUserMenuForMessage:(NCChatMessage *)message;
  27. - (void)addReplyGestureWithActionBlock:(DRCellSlideActionBlock)block;
  28. @end