Tweak sender names.

pull/1/head
Matthew Chen 7 years ago
parent 3ee16a0e34
commit 32f33f6d12

@ -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;
}

@ -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

@ -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;

@ -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);

Loading…
Cancel
Save