Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Fernando García Lidón <[email protected]>
  • Loading branch information
jeprubio and haynlo authored Sep 18, 2024
1 parent aafd3bc commit d389f24
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions library/src/main/java/com/telefonica/mistica/list/ListRowView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,17 @@ open class ListRowView @JvmOverloads constructor(
R.styleable.ListRowView_listRowHeadlineLayout,
TypedValue.TYPE_NULL
)
setHeadlineLayout(
setHeadlineLayout(
layoutRes = headlineResId.takeIf { it != TypedValue.TYPE_NULL } ?: HEADLINE_NONE,
contentDescription = styledAttrs.getString(R.styleable.ListRowView_listRowHeadlineContentDescription)
)
val headlineVisible: Boolean = styledAttrs.getBoolean(
R.styleable.ListRowView_listRowHeadlineVisible,
currentHeadlineLayoutRes != HEADLINE_NONE
)
).also {
// Visibility decision depends on the title layout initialization
val headlineVisible: Boolean = styledAttrs.getBoolean(
R.styleable.ListRowView_listRowHeadlineVisible,
currentHeadlineLayoutRes != HEADLINE_NONE
)
setHeadlineVisible(headlineVisible)
}
setHeadlineVisible(headlineVisible)

// Subtitle
Expand Down

0 comments on commit d389f24

Please sign in to comment.