mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-24 23:27:40 +01:00
adding a null check
This commit is contained in:
parent
6da7faf383
commit
c05f5fccac
@ -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…
x
Reference in New Issue
Block a user