mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
adding a null check
This commit is contained in:
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user