From 2e48e5f93ed31205adc868c4c960a003dcd0bf11 Mon Sep 17 00:00:00 2001 From: jubb Date: Mon, 28 Jun 2021 13:39:06 +1000 Subject: [PATCH] refactor: re-add link movement to text body, remove conversation footer from longmessage_activity.xml --- .../securesms/longmessage/LongMessageActivity.java | 4 +--- app/src/main/res/layout/longmessage_activity.xml | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageActivity.java b/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageActivity.java index 03af13d6b2..e5430fa78c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageActivity.java @@ -44,7 +44,6 @@ public class LongMessageActivity extends PassphraseRequiredActionBarActivity { private static final int MAX_DISPLAY_LENGTH = 64 * 1024; private TextView textBody; - private ConversationItemFooter footerText; private LongMessageViewModel viewModel; @@ -61,7 +60,6 @@ public class LongMessageActivity extends PassphraseRequiredActionBarActivity { super.onCreate(savedInstanceState, ready); setContentView(R.layout.longmessage_activity); textBody = findViewById(R.id.longmessage_text); - footerText = findViewById(R.id.longmessage_footer); initViewModel(getIntent().getLongExtra(KEY_MESSAGE_ID, -1), getIntent().getBooleanExtra(KEY_IS_MMS, false)); } @@ -105,7 +103,7 @@ public class LongMessageActivity extends PassphraseRequiredActionBarActivity { SpannableString styledBody = linkifyMessageBody(new SpannableString(trimmedBody)); textBody.setText(styledBody); - footerText.setMessageRecord(message.get().getMessageRecord(), Locale.getDefault()); + textBody.setMovementMethod(LinkMovementMethod.getInstance()); }); } diff --git a/app/src/main/res/layout/longmessage_activity.xml b/app/src/main/res/layout/longmessage_activity.xml index 382b0c6bcf..ed933b2355 100644 --- a/app/src/main/res/layout/longmessage_activity.xml +++ b/app/src/main/res/layout/longmessage_activity.xml @@ -11,15 +11,11 @@ android:padding="16dp"> - - \ No newline at end of file