mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
do not invoke SMS or Email sending intent if no contacts are in the group
This commit is contained in:
@ -116,12 +116,20 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun sendSMSToGroup() {
|
private fun sendSMSToGroup() {
|
||||||
|
if (groupContacts.isEmpty()) {
|
||||||
|
toast(R.string.no_contacts_found)
|
||||||
|
} else {
|
||||||
sendSMSToContacts(groupContacts)
|
sendSMSToContacts(groupContacts)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun sendEmailToGroup() {
|
private fun sendEmailToGroup() {
|
||||||
|
if (groupContacts.isEmpty()) {
|
||||||
|
toast(R.string.no_contacts_found)
|
||||||
|
} else {
|
||||||
sendEmailToContacts(groupContacts)
|
sendEmailToContacts(groupContacts)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun assignRingtoneToGroup() {
|
private fun assignRingtoneToGroup() {
|
||||||
val ringtonePickerIntent = getRingtonePickerIntent()
|
val ringtonePickerIntent = getRingtonePickerIntent()
|
||||||
|
Reference in New Issue
Block a user