Skip to content
Snippets Groups Projects
Commit b35691de authored by Pierre Nicolas's avatar Pierre Nicolas :joy: Committed by Pierre Nicolas
Browse files

messagestatusview: refactor

- use jvm overloads for custom view

Change-Id: If5a3111bb9cfb85c5485a7b59477ff3575f5711f
parent ed3c848c
Branches
No related tags found
No related merge requests found
...@@ -32,27 +32,15 @@ import net.jami.model.ContactViewModel ...@@ -32,27 +32,15 @@ import net.jami.model.ContactViewModel
import net.jami.model.Interaction import net.jami.model.Interaction
import net.jami.utils.Log import net.jami.utils.Log
class MessageStatusView : LinearLayout { class MessageStatusView @JvmOverloads constructor(
private val iconSize = resources.getDimensionPixelSize(R.dimen.conversation_status_icon_size) context: Context,
private val iconTint by lazy(LazyThreadSafetyMode.NONE) { ColorStateList.valueOf(ContextCompat.getColor(context, R.color.grey_500)) } attrs: AttributeSet? = null,
defStyle: Int = 0,
constructor(context: Context) : super(context) { ) : LinearLayout(context, attrs, defStyle) {
//init(null, 0)
}
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
//init(attrs, 0)
}
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) { private val iconSize = resources.getDimensionPixelSize(R.dimen.conversation_status_icon_size)
//init(attrs, defStyle) private val iconTint: ColorStateList =
} ColorStateList.valueOf(ContextCompat.getColor(context, R.color.grey_500))
/*private fun init(attrs: AttributeSet?, defStyle: Int) {
if (isInEditMode) {
update(emptyList(), Interaction.InteractionStatus.SENDING)
}
}*/
private fun resize(count: Int) { private fun resize(count: Int) {
if (count == 0) { if (count == 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment