mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
fix detekt
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
24fdf0884e
commit
4abb28e445
@ -84,12 +84,15 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
|
|||||||
itemView.isSelected = false
|
itemView.isSelected = false
|
||||||
val user = currentUserProvider.currentUser.blockingGet()
|
val user = currentUserProvider.currentUser.blockingGet()
|
||||||
|
|
||||||
var textSize = context.resources!!.getDimension(R.dimen.chat_text_size)
|
|
||||||
|
|
||||||
val hasCheckboxes = processCheckboxes(
|
val hasCheckboxes = processCheckboxes(
|
||||||
message,
|
message,
|
||||||
user
|
user
|
||||||
)
|
)
|
||||||
|
processMessage(message, hasCheckboxes)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun processMessage(message: ChatMessage, hasCheckboxes: Boolean) {
|
||||||
|
var textSize = context.resources!!.getDimension(R.dimen.chat_text_size)
|
||||||
if (!hasCheckboxes) {
|
if (!hasCheckboxes) {
|
||||||
var processedMessageText = messageUtils.enrichChatMessageText(
|
var processedMessageText = messageUtils.enrichChatMessageText(
|
||||||
binding.messageText.context,
|
binding.messageText.context,
|
||||||
@ -227,7 +230,7 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
|
|||||||
|
|
||||||
checkboxes.forEach { checkBox ->
|
checkboxes.forEach { checkBox ->
|
||||||
updatedMessage = regex.replace(updatedMessage) { matchResult ->
|
updatedMessage = regex.replace(updatedMessage) { matchResult ->
|
||||||
val taskText = matchResult.groupValues[3].trim()
|
val taskText = matchResult.groupValues[TASK_TEXT_GROUP_INDEX].trim()
|
||||||
val checkboxState = if (checkboxes.find { it.text == taskText }?.isChecked == true) "X" else " "
|
val checkboxState = if (checkboxes.find { it.text == taskText }?.isChecked == true) "X" else " "
|
||||||
"- [$checkboxState] $taskText"
|
"- [$checkboxState] $taskText"
|
||||||
}
|
}
|
||||||
|
@ -588,7 +588,7 @@ How to translate with transifex:
|
|||||||
<string name="nc_phone_book_integration_chat_via">Chat via %s</string>
|
<string name="nc_phone_book_integration_chat_via">Chat via %s</string>
|
||||||
<string name="nc_phone_book_integration_account_not_found">Account not found</string>
|
<string name="nc_phone_book_integration_account_not_found">Account not found</string>
|
||||||
<string name= "nc_edit">Edit</string>
|
<string name= "nc_edit">Edit</string>
|
||||||
<string name="edited_by">(edited by %1$s)</string>
|
|
||||||
<!-- save feature -->
|
<!-- save feature -->
|
||||||
<string name="nc_save_message">Save</string>
|
<string name="nc_save_message">Save</string>
|
||||||
<string name="nc_dialog_save_to_storage_title">Save to storage?</string>
|
<string name="nc_dialog_save_to_storage_title">Save to storage?</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user