mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
fix: movement method for all body text moved into the helper function, removed caption from legacy ThumbnailView
This commit is contained in:
parent
2a32d21933
commit
29447d6b59
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user