Merge pull request #3046 from nextcloud/issue-3026

Changed reply length to have a max of 250 characters
This commit is contained in:
Andy Scherzinger 2023-05-24 11:28:21 +02:00 committed by GitHub
commit f421788480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -189,7 +189,7 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
} else {
parentChatMessage.actorDisplayName
}
binding.messageQuote.quotedMessage.text = parentChatMessage.text
binding.messageQuote.quotedMessage.text = DisplayUtils.ellipsize(parentChatMessage.text, MAX_REPLY_LENGTH)
if (parentChatMessage.actorId?.equals(message.activeUser!!.userId) == true) {
viewThemeUtils.platform.colorViewBackground(binding.messageQuote.quoteColoredView)
@ -262,5 +262,6 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
companion object {
const val TEXT_SIZE_MULTIPLIER = 2.5
const val MAX_REPLY_LENGTH = 250
}
}

View File

@ -164,7 +164,7 @@ class OutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessageViewH
}
binding.messageQuote.quotedMessageAuthor.text = parentChatMessage.actorDisplayName
?: context!!.getText(R.string.nc_nick_guest)
binding.messageQuote.quotedMessage.text = parentChatMessage.text
binding.messageQuote.quotedMessage.text = DisplayUtils.ellipsize(parentChatMessage.text, MAX_REPLY_LENGTH)
binding.messageQuote.quotedMessageAuthor.setTextColor(textColor)
binding.messageQuote.quotedMessage.setTextColor(textColor)
@ -226,5 +226,6 @@ class OutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessageViewH
companion object {
const val TEXT_SIZE_MULTIPLIER = 2.5
const val MAX_REPLY_LENGTH = 250
}
}

View File

@ -85,7 +85,9 @@
android:layout_height="wrap_content"
android:layout_below="@id/quotedMessageImage"
android:layout_alignStart="@id/quotedMessageAuthor"
android:ellipsize="end"
android:lineSpacingMultiplier="1.2"
android:maxLines="4"
android:textAlignment="viewStart"
android:textColor="@color/high_emphasis_text"
android:textIsSelectable="false"