refactor: re-add link movement to text body, remove conversation footer from longmessage_activity.xml

This commit is contained in:
jubb 2021-06-28 13:39:06 +10:00
parent f41ab951e2
commit 2e48e5f93e
2 changed files with 2 additions and 8 deletions

View File

@ -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());
});
}

View File

@ -11,15 +11,11 @@
android:padding="16dp">
<TextView
android:textSize="@dimen/text_size"
android:id="@+id/longmessage_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<org.thoughtcrime.securesms.components.ConversationItemFooter
android:id="@+id/longmessage_footer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</ScrollView>