From ac97f47a6ae1b1bf633c7af85b469891825cfdd1 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Tue, 28 May 2019 16:17:12 +1000 Subject: [PATCH] Distinguish friends and strangers on home screen --- Signal/Signal-Info.plist | 2 +- Signal/src/ViewControllers/HomeView/HomeViewCell.m | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index 7396df8e5..258a90a89 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -7,7 +7,7 @@ CarthageVersion 0.33.0 OSXVersion - 10.14.4 + 10.14.5 WebRTCCommit 1445d719bf05280270e9f77576f80f973fd847f8 M73 diff --git a/Signal/src/ViewControllers/HomeView/HomeViewCell.m b/Signal/src/ViewControllers/HomeView/HomeViewCell.m index 1a217565a..ff96a11ad 100644 --- a/Signal/src/ViewControllers/HomeView/HomeViewCell.m +++ b/Signal/src/ViewControllers/HomeView/HomeViewCell.m @@ -532,6 +532,17 @@ NS_ASSUME_NONNULL_BEGIN name = [self.contactsManager attributedContactOrProfileNameForPhoneIdentifier:thread.contactIdentifier primaryFont:self.nameFont secondaryFont:self.nameSecondaryFont]; + BOOL hasCheckmark = self.thread.threadRecord.isContactFriend; + if (hasCheckmark) { + NSMutableAttributedString *checkmark = [[NSMutableAttributedString alloc] initWithString:@"✓"]; + [checkmark beginEditing]; + [checkmark addAttribute:NSForegroundColorAttributeName value:UIColor.ows_greenColor range:NSMakeRange(0, 1)]; + [checkmark endEditing]; + NSMutableAttributedString *mutableName = [name mutableCopy]; + [mutableName appendAttributedString:[[NSAttributedString alloc] initWithString:@" "]]; + [mutableName appendAttributedString:checkmark]; + name = [mutableName copy]; + } } }