Skip to content

Commit

Permalink
➕ add : lateinit listener null check
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjjungg committed Jan 21, 2023
1 parent 08a70e6 commit 3d77f11
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ class InterestButton : ConstraintLayout {
true -> binding.iconBg.background.setTint(ContextCompat.getColor(context, R.color.icon_bg_selected))
else -> binding.iconBg.background.setTint(ContextCompat.getColor(context, R.color.icon_bg_unSelected))
}
listener?.interestButtonOnClick(binding.description.text.toString(), interestIsSelected)
if (this::listener.isInitialized) {
listener.interestButtonOnClick(binding.description.text.toString(), interestIsSelected)
}
}
}

Expand Down

0 comments on commit 3d77f11

Please sign in to comment.