session-ios/Session/Signal/ConversationView/Cells/OWSQuotedMessageView.h

51 lines
1.6 KiB
C
Raw Normal View History

//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
2018-07-07 00:32:46 +02:00
#import "OWSBubbleView.h"
NS_ASSUME_NONNULL_BEGIN
2018-06-28 19:28:14 +02:00
@class ConversationStyle;
@class DisplayableText;
2018-06-27 18:44:06 +02:00
@class OWSBubbleShapeView;
@class OWSQuotedReplyModel;
@class TSAttachmentPointer;
@class TSQuotedMessage;
@protocol OWSQuotedMessageViewDelegate
- (void)didTapQuotedReply:(OWSQuotedReplyModel *)quotedReply
failedThumbnailDownloadAttachmentPointer:(TSAttachmentPointer *)attachmentPointer;
- (void)didCancelQuotedReply;
@end
@interface OWSQuotedMessageView : UIView
@property (nonatomic, nullable, weak) id<OWSQuotedMessageViewDelegate> delegate;
- (instancetype)init NS_UNAVAILABLE;
// Only needs to be called if we're going to render this instance.
- (void)createContents;
// Measurement
- (CGSize)sizeForMaxWidth:(CGFloat)maxWidth;
2018-04-05 16:35:57 +02:00
// Factory method for "message bubble" views.
+ (OWSQuotedMessageView *)quotedMessageViewForConversation:(OWSQuotedReplyModel *)quotedMessage
displayableQuotedText:(nullable DisplayableText *)displayableQuotedText
2018-06-28 19:28:14 +02:00
conversationStyle:(ConversationStyle *)conversationStyle
2018-06-29 20:57:33 +02:00
isOutgoing:(BOOL)isOutgoing
2018-07-07 00:32:46 +02:00
sharpCorners:(OWSDirectionalRectCorner)sharpCorners;
2018-04-05 16:35:57 +02:00
// Factory method for "message compose" views.
2018-06-28 19:28:14 +02:00
+ (OWSQuotedMessageView *)quotedMessageViewForPreview:(OWSQuotedReplyModel *)quotedMessage
conversationStyle:(ConversationStyle *)conversationStyle;
@end
NS_ASSUME_NONNULL_END