adding a couple crashfixes
This commit is contained in:
parent
e85dd634e6
commit
3105093272
|
@ -95,14 +95,18 @@ abstract class ContactActivity : SimpleActivity() {
|
||||||
|
|
||||||
fun deleteContact() {
|
fun deleteContact() {
|
||||||
ConfirmationDialog(this) {
|
ConfirmationDialog(this) {
|
||||||
|
if (contact != null) {
|
||||||
ContactsHelper(this).deleteContact(contact!!)
|
ContactsHelper(this).deleteContact(contact!!)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun shareContact() {
|
fun shareContact() {
|
||||||
|
if (contact != null) {
|
||||||
shareContacts(arrayListOf(contact!!))
|
shareContacts(arrayListOf(contact!!))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun trySendSMS() {
|
fun trySendSMS() {
|
||||||
val numbers = contact!!.phoneNumbers
|
val numbers = contact!!.phoneNumbers
|
||||||
|
|
|
@ -190,7 +190,7 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
||||||
|
|
||||||
override fun onQueryTextChange(newText: String): Boolean {
|
override fun onQueryTextChange(newText: String): Boolean {
|
||||||
if (isSearchOpen) {
|
if (isSearchOpen) {
|
||||||
getCurrentFragment().onSearchQueryChanged(newText)
|
getCurrentFragment()?.onSearchQueryChanged(newText)
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue