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