Tweak sender names.

This commit is contained in:
Matthew Chen 2018-06-29 09:27:10 -04:00
parent 3ee16a0e34
commit 32f33f6d12
4 changed files with 5 additions and 6 deletions

View File

@ -683,9 +683,9 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert(self.senderNameLabel);
OWSAssert(self.shouldShowSenderName);
self.senderNameLabel.text = self.viewItem.senderName.uppercaseString;
self.senderNameLabel.textColor = self.bodyTextColor;
self.senderNameLabel.text = self.viewItem.senderName;
self.senderNameLabel.font = UIFont.ows_dynamicTypeCaption2Font;
self.senderNameLabel.textColor = self.bodyTextColor;
self.senderNameLabel.lineBreakMode = NSLineBreakByTruncatingTail;
}

View File

@ -4910,7 +4910,7 @@ typedef enum : NSUInteger {
|| viewItem.shouldShowDate);
}
if (shouldShowSenderName) {
senderName = [self.contactsManager displayNameForPhoneIdentifier:incomingSenderId];
senderName = [self.contactsManager contactOrProfileNameForPhoneIdentifier:incomingSenderId];
}
// Show the sender avatar for incoming group messages unless

View File

@ -86,7 +86,7 @@ extern NSString *const OWSContactsManagerSignalAccountsDidChangeNotification;
- (nullable NSData *)profileImageDataForPhoneIdentifier:(nullable NSString *)identifier;
- (nullable UIImage *)imageForPhoneIdentifier:(nullable NSString *)identifier;
- (NSAttributedString *)formattedDisplayNameForSignalAccount:(SignalAccount *)signalAccount font:(UIFont *_Nonnull)font;
- (NSAttributedString *)formattedDisplayNameForSignalAccount:(SignalAccount *)signalAccount font:(UIFont *)font;
- (NSAttributedString *)formattedFullNameForRecipientId:(NSString *)recipientId font:(UIFont *)font;
- (NSString *)contactOrProfileNameForPhoneIdentifier:(NSString *)recipientId;
- (NSAttributedString *)attributedContactOrProfileNameForPhoneIdentifier:(NSString *)recipientId;

View File

@ -617,8 +617,7 @@ NSString *const OWSContactsManagerSignalAccountsDidChangeNotification
return [self displayNameForPhoneIdentifier:signalAccount.recipientId];
}
- (NSAttributedString *_Nonnull)formattedDisplayNameForSignalAccount:(SignalAccount *)signalAccount
font:(UIFont *_Nonnull)font
- (NSAttributedString *_Nonnull)formattedDisplayNameForSignalAccount:(SignalAccount *)signalAccount font:(UIFont *)font
{
OWSAssert(signalAccount);
OWSAssert(font);