diff --git a/Signal/src/ViewControllers/ConversationView/Cells/AttachmentUploadView.m b/Signal/src/ViewControllers/ConversationView/Cells/AttachmentUploadView.m index b7d90c4bf..3fe0d14b2 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/AttachmentUploadView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/AttachmentUploadView.m @@ -122,7 +122,7 @@ NS_ASSUME_NONNULL_BEGIN self.lastProgress = progress; self.isAttachmentReady = self.attachment.isUploaded; } else { - OWSFail(@"%@ Invalid attachment progress.", self.tag); + OWSFail(@"%@ Invalid attachment progress.", self.logTag); self.isAttachmentReady = YES; } } @@ -169,14 +169,14 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Logging -+ (NSString *)tag ++ (NSString *)logTag { return [NSString stringWithFormat:@"[%@]", self.class]; } -- (NSString *)tag +- (NSString *)logTag { - return self.class.tag; + return self.class.logTag; } @end diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSAudioMessageView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSAudioMessageView.m index 7913b63b7..270c7b781 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSAudioMessageView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSAudioMessageView.m @@ -213,7 +213,7 @@ NS_ASSUME_NONNULL_BEGIN _audioPlayPauseButton = [UIButton buttonWithType:UIButtonTypeCustom]; self.audioPlayPauseButton.enabled = NO; [contentView addSubview:self.audioPlayPauseButton]; - [self.audioPlayPauseButton autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:self.audioIconHMargin]; + [self.audioPlayPauseButton autoPinLeadingToSuperviewWithMargin:self.audioIconHMargin]; [self.audioPlayPauseButton autoVCenterInSuperview]; [self.audioPlayPauseButton autoSetDimension:ALDimensionWidth toSize:self.iconSize]; [self.audioPlayPauseButton autoSetDimension:ALDimensionHeight toSize:self.iconSize]; diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSGenericAttachmentView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSGenericAttachmentView.m index 8a0eb832d..7a4be5a3a 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSGenericAttachmentView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSGenericAttachmentView.m @@ -125,7 +125,7 @@ NS_ASSUME_NONNULL_BEGIN layer.fillColor = iconColor.CGColor; }; [contentView addSubview:iconCircleView]; - [iconCircleView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:self.iconHMargin]; + [iconCircleView autoPinLeadingToSuperviewWithMargin:self.iconHMargin]; [iconCircleView autoVCenterInSuperview]; [iconCircleView autoSetDimension:ALDimensionWidth toSize:self.iconSize]; [iconCircleView autoSetDimension:ALDimensionHeight toSize:self.iconSize]; diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m index 234e0b5fa..e6e193c5f 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m @@ -55,7 +55,10 @@ NS_ASSUME_NONNULL_BEGIN return; } maskedSubview.frame = self.bounds; - [JSQMessagesMediaViewBubbleImageMasker applyBubbleImageMaskToMediaView:maskedSubview isOutgoing:self.isOutgoing]; + // The JSQ masks are not RTL-safe, so we need to invert the + // mask orientation manually. + BOOL hasOutgoingMask = self.isOutgoing ^ self.isRTL; + [JSQMessagesMediaViewBubbleImageMasker applyBubbleImageMaskToMediaView:maskedSubview isOutgoing:hasOutgoingMask]; } @end diff --git a/Signal/src/ViewControllers/ConversationView/ConversationInputTextView.m b/Signal/src/ViewControllers/ConversationView/ConversationInputTextView.m index 00a60843c..a1b12a7e8 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationInputTextView.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationInputTextView.m @@ -103,12 +103,11 @@ NS_ASSUME_NONNULL_BEGIN [self textRangeFromPosition:self.beginningOfDocument toPosition:self.beginningOfDocument]; CGRect beginningTextRect = [self firstRectForRange:beginningTextRange]; - CGFloat hInset = beginningTextRect.origin.x; CGFloat topInset = beginningTextRect.origin.y; self.placeholderConstraints = @[ - [self.placeholderView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:hInset], - [self.placeholderView autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:hInset], + [self.placeholderView autoPinLeadingToSuperview], + [self.placeholderView autoPinTrailingToSuperview], [self.placeholderView autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:topInset], ]; }