mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
adding a couple crashfixes
This commit is contained in:
@ -95,14 +95,18 @@ abstract class ContactActivity : SimpleActivity() {
|
||||
|
||||
fun deleteContact() {
|
||||
ConfirmationDialog(this) {
|
||||
if (contact != null) {
|
||||
ContactsHelper(this).deleteContact(contact!!)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun shareContact() {
|
||||
if (contact != null) {
|
||||
shareContacts(arrayListOf(contact!!))
|
||||
}
|
||||
}
|
||||
|
||||
fun trySendSMS() {
|
||||
val numbers = contact!!.phoneNumbers
|
||||
|
@ -190,7 +190,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
||||
|
||||
override fun onQueryTextChange(newText: String): Boolean {
|
||||
if (isSearchOpen) {
|
||||
getCurrentFragment().onSearchQueryChanged(newText)
|
||||
getCurrentFragment()?.onSearchQueryChanged(newText)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user