mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fix crash
This commit is contained in:
parent
7b79f05eed
commit
52cfd32e67
1 changed files with 6 additions and 4 deletions
|
@ -131,9 +131,11 @@ final class ConversationCell : UITableViewCell {
|
|||
// MARK: Updating
|
||||
private func update() {
|
||||
AssertIsOnMainThread()
|
||||
MentionsManager.populateUserPublicKeyCacheIfNeeded(for: threadViewModel.threadRecord.uniqueId!) // FIXME: This is a terrible place to do this
|
||||
let thread = threadViewModel.threadRecord
|
||||
guard let threadID = thread.uniqueId else { return }
|
||||
MentionsManager.populateUserPublicKeyCacheIfNeeded(for: threadID) // FIXME: This is a terrible place to do this
|
||||
let isBlocked: Bool
|
||||
if let thread = threadViewModel.threadRecord as? TSContactThread {
|
||||
if let thread = thread as? TSContactThread {
|
||||
isBlocked = SSKEnvironment.shared.blockingManager.isRecipientIdBlocked(thread.contactIdentifier())
|
||||
} else {
|
||||
isBlocked = false
|
||||
|
@ -145,10 +147,10 @@ final class ConversationCell : UITableViewCell {
|
|||
accentView.backgroundColor = Colors.accent
|
||||
accentView.alpha = threadViewModel.hasUnreadMessages ? 1 : 0.0001 // Setting the alpha to exactly 0 causes an issue on iOS 12
|
||||
}
|
||||
profilePictureView.update(for: threadViewModel.threadRecord)
|
||||
profilePictureView.update(for: thread)
|
||||
displayNameLabel.text = getDisplayName()
|
||||
timestampLabel.text = DateUtil.formatDateShort(threadViewModel.lastMessageDate)
|
||||
if SSKEnvironment.shared.typingIndicators.typingRecipientId(forThread: self.threadViewModel.threadRecord) != nil {
|
||||
if SSKEnvironment.shared.typingIndicators.typingRecipientId(forThread: thread) != nil {
|
||||
snippetLabel.text = ""
|
||||
typingIndicatorView.isHidden = false
|
||||
typingIndicatorView.startAnimation()
|
||||
|
|
Loading…
Reference in a new issue