add some null checks at the fragments
This commit is contained in:
parent
29d316f6f4
commit
8a4c4f9324
|
@ -193,7 +193,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
|||
}
|
||||
|
||||
fun onSearchClosed() {
|
||||
(fragment_list.adapter as ContactsAdapter).updateItems(contactsIgnoringSearch)
|
||||
(fragment_list.adapter as? ContactsAdapter)?.updateItems(contactsIgnoringSearch)
|
||||
if (this is FavoritesFragment) {
|
||||
fragment_placeholder.text = activity?.getString(R.string.no_favorites)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue