Add missing bind(_:) calls

This commit is contained in:
nielsandriesse 2021-06-02 13:14:36 +10:00
parent dfd9bd89f9
commit 9397f02272

View File

@ -54,15 +54,19 @@ class VisibleMessageContentView : LinearLayout {
// Body // Body
if (message is MmsMessageRecord && message.linkPreviews.isNotEmpty()) { if (message is MmsMessageRecord && message.linkPreviews.isNotEmpty()) {
val linkPreviewView = LinkPreviewView(context) val linkPreviewView = LinkPreviewView(context)
linkPreviewView.bind(message)
mainContainer.addView(linkPreviewView) mainContainer.addView(linkPreviewView)
} else if (message is MmsMessageRecord && message.quote != null) { } else if (message is MmsMessageRecord && message.quote != null) {
val quoteView = QuoteView(context) val quoteView = QuoteView(context)
quoteView.bind(message)
mainContainer.addView(quoteView) mainContainer.addView(quoteView)
} else if (message is MmsMessageRecord && message.slideDeck.audioSlide != null) { } else if (message is MmsMessageRecord && message.slideDeck.audioSlide != null) {
val voiceMessageView = VoiceMessageView(context) val voiceMessageView = VoiceMessageView(context)
voiceMessageView.bind(message)
mainContainer.addView(voiceMessageView) mainContainer.addView(voiceMessageView)
} else if (message is MmsMessageRecord && message.slideDeck.documentSlide != null) { } else if (message is MmsMessageRecord && message.slideDeck.documentSlide != null) {
val documentView = DocumentView(context) val documentView = DocumentView(context)
documentView.bind(message)
mainContainer.addView(documentView) mainContainer.addView(documentView)
} else if (message is MmsMessageRecord && message.slideDeck.asAttachments().isNotEmpty()) { } else if (message is MmsMessageRecord && message.slideDeck.asAttachments().isNotEmpty()) {
throw IllegalStateException("Not yet implemented; we may want to use Signal's album view here.") throw IllegalStateException("Not yet implemented; we may want to use Signal's album view here.")