Skip to content

Commit

Permalink
Fix: #241 - Data attributes list screen localization
Browse files Browse the repository at this point in the history
  • Loading branch information
josmilan authored and georgepadayatti committed Nov 28, 2023
1 parent 03296b8 commit 5bd8e7a
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,21 @@ class BBConsentDataAttributesAdapter(
class ViewHolder(itemRowBinding: BbconsentItemDataAttributeBinding) :
RecyclerView.ViewHolder(itemRowBinding.root) {
var itemRowBinding: BbconsentItemDataAttributeBinding
fun bind(attribute: DataAttribute?, mListener: DataAttributeClickListener, isLast: Boolean) {
fun bind(
attribute: DataAttribute?,
mListener: DataAttributeClickListener,
isLast: Boolean
) {
itemRowBinding.ctvItemName.text = attribute?.description
if (attribute?.status?.consented != null && !attribute.status?.consented.equals("")
) {
itemRowBinding.ctvStatus.text = BBConsentStringUtils.toCamelCase(
attribute.status?.consented
if (attribute.status?.consented.equals("allow", true))
itemRowBinding.ctvStatus.context.resources.getString(R.string.bb_consent_data_attribute_allow)
else if (attribute.status?.consented.equals("disallow", true))
itemRowBinding.ctvStatus.context.resources.getString(R.string.bb_consent_dashboard_disallow)
else
attribute.status?.consented
)
} else {
itemRowBinding.ctvStatus.text =
Expand Down

0 comments on commit 5bd8e7a

Please sign in to comment.