diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionsListHeaderView.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionsListHeaderView.kt index 2b93c3447e..924228444a 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionsListHeaderView.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionsListHeaderView.kt @@ -24,6 +24,7 @@ import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.res.use import androidx.core.view.isVisible import im.vector.app.R +import im.vector.app.core.extensions.setTextOrHide import im.vector.app.core.extensions.setTextWithColoredPart import im.vector.app.databinding.ViewSessionsListHeaderBinding @@ -54,12 +55,7 @@ class SessionsListHeaderView @JvmOverloads constructor( private fun setTitle(typedArray: TypedArray) { val title = typedArray.getString(R.styleable.SessionsListHeaderView_devicesListHeaderTitle) - if (title.isNullOrEmpty()) { - binding.sessionsListHeaderTitle.isVisible = false - } else { - binding.sessionsListHeaderTitle.isVisible = true - binding.sessionsListHeaderTitle.text = title - } + binding.sessionsListHeaderTitle.setTextOrHide(title) } private fun setDescription(typedArray: TypedArray) {