Allow long form messages if stories aren't enabled.

Fixes #12369
This commit is contained in:
Alex Hart 2022-08-04 10:54:29 -03:00 committed by Greyson Parrelli
parent 710bb386e2
commit 0a2696113c
2 changed files with 4 additions and 2 deletions

View file

@ -159,7 +159,7 @@ class MediaSelectionRepository(context: Context) {
}
private fun getTruncatedBody(body: String?): String? {
return if (body.isNullOrEmpty()) {
return if (!Stories.isFeatureEnabled() || body.isNullOrEmpty()) {
body
} else {
val iterator = BreakIteratorCompat.getInstance()

View file

@ -79,7 +79,9 @@ class AddMessageDialogFragment : KeyboardEntryDialogFragment(R.layout.v2_media_a
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
input = view.findViewById(R.id.add_a_message_input)
EditTextUtil.addGraphemeClusterLimitFilter(input, Stories.MAX_BODY_SIZE)
if (Stories.isFeatureEnabled()) {
EditTextUtil.addGraphemeClusterLimitFilter(input, Stories.MAX_BODY_SIZE)
}
input.setText(requireArguments().getCharSequence(ARG_INITIAL_TEXT))