From 63d442584c1bf0c8919793f1f20dae0cacde690d Mon Sep 17 00:00:00 2001 From: Andrew Gallasch Date: Thu, 13 Apr 2023 16:24:03 +0930 Subject: [PATCH] Fix empty message behind media message (#1150) --- .../conversation/v2/messages/VisibleMessageContentView.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt index 8c33e4473c..75a3c58752 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageContentView.kt @@ -10,10 +10,8 @@ import android.text.style.ForegroundColorSpan import android.text.style.URLSpan import android.text.util.Linkify import android.util.AttributeSet -import android.view.LayoutInflater import android.view.MotionEvent import android.view.View -import android.widget.LinearLayout import androidx.annotation.ColorInt import androidx.appcompat.app.AppCompatActivity import androidx.constraintlayout.widget.ConstraintLayout @@ -22,6 +20,7 @@ import androidx.core.graphics.BlendModeColorFilterCompat import androidx.core.graphics.BlendModeCompat import androidx.core.text.getSpans import androidx.core.text.toSpannable +import androidx.core.view.children import androidx.core.view.isVisible import network.loki.messenger.R import network.loki.messenger.databinding.ViewVisibleMessageContentBinding @@ -223,6 +222,7 @@ class VisibleMessageContentView : ConstraintLayout { } binding.bodyTextView.isVisible = message.body.isNotEmpty() && !hideBody + binding.contentParent.apply { isVisible = children.any { it.isVisible } } if (message.body.isNotEmpty() && !hideBody) { val color = getTextColor(context, message)