show a toast message when trying to call someone without phone number

This commit is contained in:
tibbi 2017-12-18 21:46:44 +01:00
parent 2ffcc10c19
commit cac0cc4d37
6 changed files with 11 additions and 1 deletions

View File

@ -163,7 +163,12 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
if (currAdapter == null) {
ContactsAdapter(this, contacts, this, contacts_list) {
if (config.callContact) {
tryStartCall(it as Contact)
val contact = it as Contact
if (contact.phoneNumbers.isNotEmpty()) {
tryStartCall(it)
} else {
toast(R.string.no_phone_number_found)
}
} else {
openContact(it as Contact)
}

View File

@ -31,6 +31,7 @@
<string name="work_fax">Arbeit Fax</string>
<string name="home_fax">Privat Fax</string>
<string name="pager">Pager</string>
<string name="no_phone_number_found">No phone number has been found</string>
<!-- Events -->
<string name="birthday">Geburtstag</string>

View File

@ -31,6 +31,7 @@
<string name="work_fax">Work Fax</string>
<string name="home_fax">Home Fax</string>
<string name="pager">Pager</string>
<string name="no_phone_number_found">No phone number has been found</string>
<!-- Events -->
<string name="birthday">Birthday</string>

View File

@ -31,6 +31,7 @@
<string name="work_fax">Work Fax</string>
<string name="home_fax">Home Fax</string>
<string name="pager">Pager</string>
<string name="no_phone_number_found">No phone number has been found</string>
<!-- Events -->
<string name="birthday">Birthday</string>

View File

@ -31,6 +31,7 @@
<string name="work_fax">Pracovný fax</string>
<string name="home_fax">Domáci fax</string>
<string name="pager">Pager</string>
<string name="no_phone_number_found">Nenašlo sa žiadne telefónne číslo</string>
<!-- Events -->
<string name="birthday">Narodeniny</string>

View File

@ -31,6 +31,7 @@
<string name="work_fax">Work Fax</string>
<string name="home_fax">Home Fax</string>
<string name="pager">Pager</string>
<string name="no_phone_number_found">No phone number has been found</string>
<!-- Events -->
<string name="birthday">Birthday</string>