mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
refactor: re-add link movement to text body, remove conversation footer from longmessage_activity.xml
This commit is contained in:
parent
f41ab951e2
commit
2e48e5f93e
@ -44,7 +44,6 @@ public class LongMessageActivity extends PassphraseRequiredActionBarActivity {
|
|||||||
private static final int MAX_DISPLAY_LENGTH = 64 * 1024;
|
private static final int MAX_DISPLAY_LENGTH = 64 * 1024;
|
||||||
|
|
||||||
private TextView textBody;
|
private TextView textBody;
|
||||||
private ConversationItemFooter footerText;
|
|
||||||
|
|
||||||
private LongMessageViewModel viewModel;
|
private LongMessageViewModel viewModel;
|
||||||
|
|
||||||
@ -61,7 +60,6 @@ public class LongMessageActivity extends PassphraseRequiredActionBarActivity {
|
|||||||
super.onCreate(savedInstanceState, ready);
|
super.onCreate(savedInstanceState, ready);
|
||||||
setContentView(R.layout.longmessage_activity);
|
setContentView(R.layout.longmessage_activity);
|
||||||
textBody = findViewById(R.id.longmessage_text);
|
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));
|
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));
|
SpannableString styledBody = linkifyMessageBody(new SpannableString(trimmedBody));
|
||||||
|
|
||||||
textBody.setText(styledBody);
|
textBody.setText(styledBody);
|
||||||
footerText.setMessageRecord(message.get().getMessageRecord(), Locale.getDefault());
|
textBody.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,15 +11,11 @@
|
|||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:textSize="@dimen/text_size"
|
||||||
android:id="@+id/longmessage_text"
|
android:id="@+id/longmessage_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
Loading…
x
Reference in New Issue
Block a user