Resolve FIXME

This commit is contained in:
Niels Andriesse 2021-08-03 09:37:48 +10:00
parent 6851531014
commit dff9f287b8
2 changed files with 2 additions and 3 deletions

View file

@ -157,8 +157,7 @@ final class ConversationCell : UITableViewCell {
// MARK: Updating
private func update() {
AssertIsOnMainThread()
guard let thread = threadViewModel?.threadRecord, let threadID = thread.uniqueId else { return }
MentionsManager.populateUserPublicKeyCacheIfNeeded(for: threadID) // FIXME: This is a terrible place to do this
guard let thread = threadViewModel?.threadRecord else { return }
let isBlocked: Bool
if let thread = thread as? TSContactThread {
isBlocked = SSKEnvironment.shared.blockingManager.isRecipientIdBlocked(thread.contactSessionID())

View file

@ -69,7 +69,7 @@ public final class ProfilePictureView : UIView {
publicKey = ""
useFallbackPicture = true
} else { // A closed group
var users = MentionsManager.userPublicKeyCache[thread.uniqueId!] ?? []
var users = Set(thread.groupModel.groupMemberIds)
users.remove(getUserHexEncodedPublicKey())
var randomUsers = users.sorted() // Sort to provide a level of stability
if users.count == 1 {