mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-25 06:25:40 +03:00
Making reply length a const
Signed-off-by: Julius Linus <julius.linus@nextcloud.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
a926c27ae7
commit
93da3a9c65
2 changed files with 4 additions and 4 deletions
|
@ -171,7 +171,6 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
|
|||
}
|
||||
|
||||
private fun processParentMessage(message: ChatMessage) {
|
||||
val maxReplyLength = 250
|
||||
val parentChatMessage = message.parentMessage
|
||||
parentChatMessage!!.activeUser = message.activeUser
|
||||
parentChatMessage.imageUrl?.let {
|
||||
|
@ -190,7 +189,7 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
|
|||
} else {
|
||||
parentChatMessage.actorDisplayName
|
||||
}
|
||||
binding.messageQuote.quotedMessage.text = DisplayUtils.ellipsize(parentChatMessage.text, maxReplyLength)
|
||||
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)
|
||||
|
@ -263,5 +262,6 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
|
|||
|
||||
companion object {
|
||||
const val TEXT_SIZE_MULTIPLIER = 2.5
|
||||
const val MAX_REPLY_LENGTH = 250
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,7 +148,6 @@ class OutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessageViewH
|
|||
}
|
||||
|
||||
private fun processParentMessage(message: ChatMessage) {
|
||||
val maxReplyLength = 250
|
||||
val parentChatMessage = message.parentMessage
|
||||
val textColor = viewThemeUtils.getScheme(binding.messageQuote.quotedMessage.context).onSurfaceVariant
|
||||
parentChatMessage!!.activeUser = message.activeUser
|
||||
|
@ -165,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 = DisplayUtils.ellipsize(parentChatMessage.text, maxReplyLength)
|
||||
binding.messageQuote.quotedMessage.text = DisplayUtils.ellipsize(parentChatMessage.text, MAX_REPLY_LENGTH)
|
||||
|
||||
binding.messageQuote.quotedMessageAuthor.setTextColor(textColor)
|
||||
binding.messageQuote.quotedMessage.setTextColor(textColor)
|
||||
|
@ -227,5 +226,6 @@ class OutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessageViewH
|
|||
|
||||
companion object {
|
||||
const val TEXT_SIZE_MULTIPLIER = 2.5
|
||||
const val MAX_REPLY_LENGTH = 250
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue