mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			102 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			C
		
	
		
		
			
		
	
	
			102 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			C
		
	
| 
											8 years ago
										 | //
 | ||
| 
											7 years ago
										 | //  Copyright (c) 2019 Open Whisper Systems. All rights reserved.
 | ||
| 
											8 years ago
										 | //
 | ||
|  | 
 | ||
|  | NS_ASSUME_NONNULL_BEGIN | ||
|  | 
 | ||
| 
											8 years ago
										 | @class ContactShareViewModel; | ||
| 
											7 years ago
										 | @class ConversationStyle; | ||
| 
											7 years ago
										 | 
 | ||
|  | @protocol ConversationViewItem; | ||
|  | 
 | ||
| 
											8 years ago
										 | @class OWSContact; | ||
| 
											7 years ago
										 | @class OWSLinkPreview; | ||
| 
											8 years ago
										 | @class OWSQuotedReplyModel; | ||
| 
											8 years ago
										 | @class TSAttachmentPointer; | ||
|  | @class TSAttachmentStream; | ||
|  | @class TSOutgoingMessage; | ||
| 
											8 years ago
										 | 
 | ||
|  | typedef NS_ENUM(NSUInteger, OWSMessageGestureLocation) { | ||
|  |     // Message text, etc.
 | ||
|  |     OWSMessageGestureLocation_Default, | ||
|  |     OWSMessageGestureLocation_OversizeText, | ||
|  |     OWSMessageGestureLocation_Media, | ||
|  |     OWSMessageGestureLocation_QuotedReply, | ||
| 
											7 years ago
										 |     OWSMessageGestureLocation_LinkPreview, | ||
| 
											8 years ago
										 | }; | ||
|  | 
 | ||
| 
											8 years ago
										 | @protocol OWSMessageBubbleViewDelegate | ||
|  | 
 | ||
| 
											7 years ago
										 | - (void)didTapImageViewItem:(id<ConversationViewItem>)viewItem | ||
| 
											8 years ago
										 |            attachmentStream:(TSAttachmentStream *)attachmentStream | ||
|  |                   imageView:(UIView *)imageView; | ||
|  | 
 | ||
| 
											7 years ago
										 | - (void)didTapVideoViewItem:(id<ConversationViewItem>)viewItem | ||
| 
											8 years ago
										 |            attachmentStream:(TSAttachmentStream *)attachmentStream | ||
|  |                   imageView:(UIView *)imageView; | ||
|  | 
 | ||
| 
											7 years ago
										 | - (void)didTapAudioViewItem:(id<ConversationViewItem>)viewItem attachmentStream:(TSAttachmentStream *)attachmentStream; | ||
| 
											5 years ago
										 | - (void)didPanAudioViewItemToCurrentTime:(NSTimeInterval)currentTime; | ||
| 
											8 years ago
										 | 
 | ||
| 
											7 years ago
										 | - (void)didTapTruncatedTextMessage:(id<ConversationViewItem>)conversationItem; | ||
| 
											8 years ago
										 | 
 | ||
| 
											7 years ago
										 | - (void)didTapFailedIncomingAttachment:(id<ConversationViewItem>)viewItem; | ||
| 
											8 years ago
										 | 
 | ||
| 
											7 years ago
										 | - (void)didTapConversationItem:(id<ConversationViewItem>)viewItem quotedReply:(OWSQuotedReplyModel *)quotedReply; | ||
|  | - (void)didTapConversationItem:(id<ConversationViewItem>)viewItem | ||
| 
											8 years ago
										 |                                  quotedReply:(OWSQuotedReplyModel *)quotedReply | ||
|  |     failedThumbnailDownloadAttachmentPointer:(TSAttachmentPointer *)attachmentPointer; | ||
| 
											8 years ago
										 | 
 | ||
| 
											7 years ago
										 | - (void)didTapConversationItem:(id<ConversationViewItem>)viewItem linkPreview:(OWSLinkPreview *)linkPreview; | ||
|  | 
 | ||
| 
											7 years ago
										 | @property (nonatomic, readonly, nullable) NSString *lastSearchedText; | ||
|  | 
 | ||
| 
											8 years ago
										 | @end | ||
|  | 
 | ||
| 
											7 years ago
										 | #pragma mark -
 | ||
|  | 
 | ||
| 
											8 years ago
										 | @interface OWSMessageBubbleView : UIView | ||
|  | 
 | ||
| 
											7 years ago
										 | @property (nonatomic, nullable) id<ConversationViewItem> viewItem; | ||
| 
											8 years ago
										 | 
 | ||
| 
											7 years ago
										 | @property (nonatomic) ConversationStyle *conversationStyle; | ||
| 
											8 years ago
										 | 
 | ||
|  | @property (nonatomic) NSCache *cellMediaCache; | ||
|  | 
 | ||
| 
											8 years ago
										 | @property (nonatomic, nullable, readonly) UIView *bodyMediaView; | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 | @property (nonatomic, weak) id<OWSMessageBubbleViewDelegate> delegate; | ||
|  | 
 | ||
| 
											8 years ago
										 | - (instancetype)init NS_UNAVAILABLE; | ||
|  | 
 | ||
|  | - (instancetype)initWithFrame:(CGRect)frame NS_DESIGNATED_INITIALIZER; | ||
|  | 
 | ||
|  | - (instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE; | ||
|  | 
 | ||
|  | - (void)configureViews; | ||
|  | 
 | ||
|  | - (void)loadContent; | ||
|  | - (void)unloadContent; | ||
|  | 
 | ||
| 
											7 years ago
										 | - (CGSize)measureSize; | ||
| 
											8 years ago
										 | 
 | ||
|  | - (void)prepareForReuse; | ||
|  | 
 | ||
| 
											7 years ago
										 | + (NSDictionary *)senderNamePrimaryAttributes; | ||
|  | + (NSDictionary *)senderNameSecondaryAttributes; | ||
|  | 
 | ||
| 
											8 years ago
										 | #pragma mark - Gestures
 | ||
|  | 
 | ||
| 
											8 years ago
										 | - (OWSMessageGestureLocation)gestureLocationForLocation:(CGPoint)locationInMessageBubble; | ||
|  | 
 | ||
| 
											8 years ago
										 | // This only needs to be called when we use the cell _outside_ the context
 | ||
|  | // of a conversation view message cell.
 | ||
|  | - (void)addTapGestureHandler; | ||
|  | 
 | ||
|  | - (void)handleTapGesture:(UITapGestureRecognizer *)sender; | ||
| 
											5 years ago
										 | - (void)handlePanGesture:(UIPanGestureRecognizer *)sender; | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 | @end | ||
|  | 
 | ||
|  | NS_ASSUME_NONNULL_END |