This commit is contained in:
Ryan Zhao 2021-06-29 16:17:19 +10:00
commit aac58ac5cf

View File

@ -99,7 +99,7 @@ class VisibleMessageContentView : LinearLayout {
onContentDoubleTap = { voiceMessageView.handleDoubleTap() } onContentDoubleTap = { voiceMessageView.handleDoubleTap() }
} 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, getTextColor(context, message)) documentView.bind(message, VisibleMessageContentView.getTextColor(context, 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()) {
val albumThumbnailView = AlbumThumbnailView(context) val albumThumbnailView = AlbumThumbnailView(context)
@ -115,11 +115,11 @@ class VisibleMessageContentView : LinearLayout {
onContentClick = { albumThumbnailView.calculateHitObject(it, message) } onContentClick = { albumThumbnailView.calculateHitObject(it, message) }
} else if (message.isOpenGroupInvitation) { } else if (message.isOpenGroupInvitation) {
val openGroupInvitationView = OpenGroupInvitationView(context) val openGroupInvitationView = OpenGroupInvitationView(context)
openGroupInvitationView.bind(message, getTextColor(context, message)) openGroupInvitationView.bind(message, VisibleMessageContentView.getTextColor(context, message))
mainContainer.addView(openGroupInvitationView) mainContainer.addView(openGroupInvitationView)
onContentClick = { openGroupInvitationView.joinOpenGroup() } onContentClick = { openGroupInvitationView.joinOpenGroup() }
} else { } else {
val bodyTextView = getBodyTextView(context, message, searchQuery) val bodyTextView = VisibleMessageContentView.getBodyTextView(context, message, searchQuery)
mainContainer.addView(bodyTextView) mainContainer.addView(bodyTextView)
} }
} }