show a toast message when trying to call someone without phone number
This commit is contained in:
parent
2ffcc10c19
commit
cac0cc4d37
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue