Merge pull request #603 from mpretty-cyro/fix/link-preview-crash

Fix link preview crash
pull/609/head
RyanZhao 2 years ago committed by GitHub
commit 3e20519a6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,7 @@ final class LinkPreviewView : UIView {
private lazy var imageViewContainerHeightConstraint = imageView.set(.height, to: 100)
private lazy var sentLinkPreviewTextColor: UIColor = {
let isOutgoing = (viewItem!.interaction.interactionType() == .outgoingMessage)
let isOutgoing = (viewItem?.interaction.interactionType() == .outgoingMessage)
switch (isOutgoing, AppModeManager.shared.currentAppMode) {
case (true, .dark), (false, .light): return .black
case (true, .light): return Colors.grey

Loading…
Cancel
Save