adding a null check
This commit is contained in:
parent
6da7faf383
commit
c05f5fccac
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
||||||
fun textColorChanged(color: Int) {
|
fun textColorChanged(color: Int) {
|
||||||
when {
|
when {
|
||||||
this is GroupsFragment -> (fragment_list.adapter as GroupsAdapter).updateTextColor(color)
|
this is GroupsFragment -> (fragment_list.adapter as GroupsAdapter).updateTextColor(color)
|
||||||
else -> (fragment_list.adapter as ContactsAdapter).apply {
|
else -> (fragment_list.adapter as? ContactsAdapter)?.apply {
|
||||||
updateTextColor(color)
|
updateTextColor(color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue