mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-10 06:14:10 +01:00
use constants
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
47551284f6
commit
24fdf0884e
@ -168,8 +168,9 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
|
|||||||
val checkboxList = mutableListOf<CheckBox>()
|
val checkboxList = mutableListOf<CheckBox>()
|
||||||
|
|
||||||
matches.forEach { matchResult ->
|
matches.forEach { matchResult ->
|
||||||
val isChecked = matchResult.groupValues[2] == "X" || matchResult.groupValues[2] == "x"
|
val isChecked = matchResult.groupValues[CHECKED_GROUP_INDEX] == "X" ||
|
||||||
val taskText = matchResult.groupValues[3].trim()
|
matchResult.groupValues[CHECKED_GROUP_INDEX] == "x"
|
||||||
|
val taskText = matchResult.groupValues[TASK_TEXT_GROUP_INDEX].trim()
|
||||||
|
|
||||||
val checkBox = CheckBox(checkBoxContainer.context).apply {
|
val checkBox = CheckBox(checkBoxContainer.context).apply {
|
||||||
text = taskText
|
text = taskText
|
||||||
@ -341,5 +342,7 @@ class IncomingTextMessageViewHolder(itemView: View, payload: Any) :
|
|||||||
companion object {
|
companion object {
|
||||||
const val TEXT_SIZE_MULTIPLIER = 2.5
|
const val TEXT_SIZE_MULTIPLIER = 2.5
|
||||||
private val TAG = IncomingTextMessageViewHolder::class.java.simpleName
|
private val TAG = IncomingTextMessageViewHolder::class.java.simpleName
|
||||||
|
private const val CHECKED_GROUP_INDEX = 2
|
||||||
|
private const val TASK_TEXT_GROUP_INDEX = 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user