diff --git a/src/UIBubbleTableView.h b/src/UIBubbleTableView.h index e7a617d..b92b681 100644 --- a/src/UIBubbleTableView.h +++ b/src/UIBubbleTableView.h @@ -26,5 +26,6 @@ typedef enum _NSBubbleTypingType @property (nonatomic) NSTimeInterval snapInterval; @property (nonatomic) NSBubbleTypingType typingBubble; @property (nonatomic) BOOL showAvatars; +@property (nonatomic) BOOL showOnlySomeoneElseAvatar; @end diff --git a/src/UIBubbleTableView.m b/src/UIBubbleTableView.m index 8b91982..98d19fd 100644 --- a/src/UIBubbleTableView.m +++ b/src/UIBubbleTableView.m @@ -26,6 +26,7 @@ @implementation UIBubbleTableView @synthesize bubbleSection = _bubbleSection; @synthesize typingBubble = _typingBubble; @synthesize showAvatars = _showAvatars; +@synthesize showOnlySomeoneElseAvatar = _showOnlySomeoneElseAvatar; #pragma mark - Initializators @@ -226,6 +227,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N cell.data = data; cell.showAvatar = self.showAvatars; + cell.showOnlySomeoneElseAvatar = self.showOnlySomeoneElseAvatar; return cell; } diff --git a/src/UIBubbleTableViewCell.h b/src/UIBubbleTableViewCell.h old mode 100644 new mode 100755 index 7d38287..51e6f78 --- a/src/UIBubbleTableViewCell.h +++ b/src/UIBubbleTableViewCell.h @@ -15,5 +15,6 @@ @property (nonatomic, strong) NSBubbleData *data; @property (nonatomic) BOOL showAvatar; +@property (nonatomic) BOOL showOnlySomeoneElseAvatar; @end diff --git a/src/UIBubbleTableViewCell.m b/src/UIBubbleTableViewCell.m old mode 100644 new mode 100755 index 3aeaa1d..190a28d --- a/src/UIBubbleTableViewCell.m +++ b/src/UIBubbleTableViewCell.m @@ -28,6 +28,7 @@ @implementation UIBubbleTableViewCell @synthesize customView = _customView; @synthesize bubbleImage = _bubbleImage; @synthesize showAvatar = _showAvatar; +@synthesize showOnlySomeoneElseAvatar = _showOnlySomeoneElseAvatar; @synthesize avatarImage = _avatarImage; - (void)setFrame:(CGRect)frame @@ -76,7 +77,7 @@ - (void) setupInternalData CGFloat y = 0; // Adjusting the x coordinate for avatar - if (self.showAvatar) + if (self.showAvatar || (self.showOnlySomeoneElseAvatar && type == BubbleTypeSomeoneElse)) { [self.avatarImage removeFromSuperview]; #if !__has_feature(objc_arc)