mirror of
				https://github.com/SimpleMobileTools/Simple-Contacts.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	adding some null checks
This commit is contained in:
		| @@ -111,10 +111,10 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { | ||||
|             if (viewpager.adapter == null) { | ||||
|                 initFragments() | ||||
|             } | ||||
|             contacts_fragment.initContacts() | ||||
|             contacts_fragment.onActivityResume() | ||||
|             favorites_fragment.initContacts() | ||||
|             favorites_fragment.onActivityResume() | ||||
|             contacts_fragment?.initContacts() | ||||
|             contacts_fragment?.onActivityResume() | ||||
|             favorites_fragment?.initContacts() | ||||
|             favorites_fragment?.onActivityResume() | ||||
|         } | ||||
|         isFirstResume = false | ||||
|     } | ||||
|   | ||||
| @@ -179,7 +179,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet) | ||||
|     } | ||||
|  | ||||
|     fun onSearchOpened() { | ||||
|         contactsIgnoringSearch = (fragment_list.adapter as ContactsAdapter).contactItems as ArrayList | ||||
|         contactsIgnoringSearch = (fragment_list.adapter as? ContactsAdapter)?.contactItems as ArrayList | ||||
|     } | ||||
|  | ||||
|     fun onSearchClosed() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user