fix: movement method for all body text moved into the helper function, removed caption from legacy ThumbnailView

This commit is contained in:
jubb 2021-06-29 16:09:01 +10:00
parent 2a32d21933
commit 29447d6b59
3 changed files with 2 additions and 5 deletions

View File

@ -54,7 +54,6 @@ class LinkPreviewView : LinearLayout {
titleTextView.setTextColor(ResourcesCompat.getColor(resources, textColorID, context.theme))
// Body
val bodyTextView = VisibleMessageContentView.getBodyTextView(context, message)
bodyTextView.movementMethod = LinkMovementMethod.getInstance()
mainLinkPreviewContainer.addView(bodyTextView)
// Corner radii
val cornerRadii = MessageBubbleUtilities.calculateRadii(context, isStartOfMessageCluster, isEndOfMessageCluster, message.isOutgoing)

View File

@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.conversation.v2.messages
import android.content.Context
import android.graphics.Rect
import android.graphics.drawable.Drawable
import android.text.method.LinkMovementMethod
import android.text.style.ReplacementSpan
import android.text.style.URLSpan
import android.text.util.Linkify
@ -171,6 +172,7 @@ class VisibleMessageContentView : LinearLayout {
body = MentionUtilities.highlightMentions(body, message.isOutgoing, message.threadId, context);
result.text = body
result.movementMethod = LinkMovementMethod.getInstance()
return result
}

View File

@ -57,7 +57,6 @@ public class ThumbnailView extends FrameLayout {
private ImageView image;
private View playOverlay;
private View captionIcon;
private View loadIndicator;
private OnClickListener parentClickListener;
@ -87,7 +86,6 @@ public class ThumbnailView extends FrameLayout {
this.image = findViewById(R.id.thumbnail_image);
this.playOverlay = findViewById(R.id.play_overlay);
this.captionIcon = findViewById(R.id.thumbnail_caption_icon);
this.loadIndicator = findViewById(R.id.thumbnail_load_indicator);
super.setOnClickListener(new ThumbnailClickDispatcher());
@ -278,8 +276,6 @@ public class ThumbnailView extends FrameLayout {
this.slide = slide;
this.captionIcon.setVisibility(GONE);
dimens[WIDTH] = naturalWidth;
dimens[HEIGHT] = naturalHeight;
invalidate();