adding some null checks at menu items

This commit is contained in:
tibbi 2022-07-03 18:51:44 +02:00
parent 456a90dcbb
commit 9b4c0a3308
1 changed files with 7 additions and 3 deletions

View File

@ -109,7 +109,9 @@ class ViewContactActivity : ContactActivity() {
}
findItem(R.id.edit).setOnMenuItemClickListener {
if (contact != null) {
launchEditContact(contact!!)
}
true
}
@ -294,9 +296,11 @@ class ViewContactActivity : ContactActivity() {
}
private fun openWith() {
if (contact != null) {
val uri = getContactPublicUri(contact!!)
launchViewContactIntent(uri)
}
}
private fun setupFavorite() {
contact_toggle_favorite.apply {