Respond to CR.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 3c59678b7d
commit ab95b04e56

@ -47,6 +47,15 @@ NS_ASSUME_NONNULL_BEGIN
@implementation OWSMessagesBubblesSizeCalculator
- (instancetype)init
{
if (self = [super init]) {
_referenceSystemMessageCell = [OWSSystemMessageCell new];
_referenceUnreadIndicatorCell = [OWSUnreadIndicatorCell new];
}
return self;
}
/**
* Computes and returns the size of the `messageBubbleImageView` property
* of a `JSQMessagesCollectionViewCell` for the specified messageData at indexPath.
@ -119,10 +128,6 @@ NS_ASSUME_NONNULL_BEGIN
return [cachedSize CGSizeValue];
}
if (!self.referenceSystemMessageCell) {
_referenceSystemMessageCell = [OWSSystemMessageCell new];
}
CGSize result = [self.referenceSystemMessageCell cellSizeForInteraction:interaction
collectionViewWidth:layout.collectionView.width];
@ -143,10 +148,6 @@ NS_ASSUME_NONNULL_BEGIN
return [cachedSize CGSizeValue];
}
if (!self.referenceUnreadIndicatorCell) {
_referenceUnreadIndicatorCell = [OWSUnreadIndicatorCell new];
}
CGSize result = [self.referenceUnreadIndicatorCell cellSizeForInteraction:interaction
collectionViewWidth:layout.collectionView.width];

@ -1308,7 +1308,7 @@ typedef enum : NSUInteger {
}
// Bubbles
self.collectionView.collectionViewLayout.bubbleSizeCalculator = [[OWSMessagesBubblesSizeCalculator alloc] init];
self.collectionView.collectionViewLayout.bubbleSizeCalculator = [OWSMessagesBubblesSizeCalculator new];
JSQMessagesBubbleImageFactory *bubbleFactory = [[JSQMessagesBubbleImageFactory alloc] init];
self.incomingBubbleImageData =
[bubbleFactory incomingMessagesBubbleImageWithColor:[UIColor jsq_messageBubbleLightGrayColor]];

@ -31,6 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
@implementation OWSSystemMessageCell
// `[UIView init]` invokes `[self initWithFrame:...]`.
- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {

@ -29,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
@implementation OWSUnreadIndicatorCell
// `[UIView init]` invokes `[self initWithFrame:...]`.
- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {

Loading…
Cancel
Save