From 19a0c325ddf3027adb955f9e7c91487464e220dc Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 30 Oct 2020 11:40:05 +1100 Subject: [PATCH] Fix various share screen issues --- .../ViewControllers/SelectThreadViewController.m | 3 +++ SignalMessaging/Views/ContactCellView.m | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/SignalMessaging/ViewControllers/SelectThreadViewController.m b/SignalMessaging/ViewControllers/SelectThreadViewController.m index f4d3b0bfe..8c69e94a1 100644 --- a/SignalMessaging/ViewControllers/SelectThreadViewController.m +++ b/SignalMessaging/ViewControllers/SelectThreadViewController.m @@ -129,6 +129,9 @@ NS_ASSUME_NONNULL_BEGIN [_tableViewController.view autoPinEdgeToSuperviewEdge:ALEdgeBottom]; self.tableViewController.tableView.rowHeight = UITableViewAutomaticDimension; self.tableViewController.tableView.estimatedRowHeight = 60; + BOOL isIphone6OrSmaller = (UIScreen.mainScreen.bounds.size.height - 667) < 1; + CGFloat bottomInset = isIphone6OrSmaller ? LKValues.mediumSpacing : 34.0f; + self.tableViewController.tableView.contentInset = UIEdgeInsetsMake(0, 0, bottomInset, 0); } - (void)yapDatabaseModifiedExternally:(NSNotification *)notification diff --git a/SignalMessaging/Views/ContactCellView.m b/SignalMessaging/Views/ContactCellView.m index 179d7a079..be6053e5c 100644 --- a/SignalMessaging/Views/ContactCellView.m +++ b/SignalMessaging/Views/ContactCellView.m @@ -196,6 +196,9 @@ const CGFloat kContactCellAvatarTextMargin = 12; name:kNSNotificationName_OtherUsersProfileDidChange object:nil]; [self updateProfileName]; + } else { + self.nameLabel.text = thread.name; + [self.nameLabel setNeedsLayout]; } [self updateAvatar]; @@ -211,6 +214,9 @@ const CGFloat kContactCellAvatarTextMargin = 12; - (void)updateAvatar { + [LKStorage readWithBlock:^(YapDatabaseReadTransaction *transaction) { + [LKMentionsManager populateUserPublicKeyCacheIfNeededFor:self.thread.uniqueId in:transaction]; // FIXME: This is a terrible place to do this + }]; if (self.thread != nil) { [self.profilePictureView updateForThread:self.thread]; } else {