mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-17 03:51:03 +01:00
Prevented adding empty contact (#728)
This commit is contained in:
parent
2bfcfa8c3f
commit
bbadfa1f2e
@ -25,6 +25,7 @@ import com.simplemobiletools.commons.dialogs.SelectAlarmSoundDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.commons.views.MyEditText
|
||||
import com.simplemobiletools.contacts.pro.R
|
||||
import com.simplemobiletools.contacts.pro.dialogs.CustomLabelDialog
|
||||
import com.simplemobiletools.contacts.pro.dialogs.MyDatePickerDialog
|
||||
@ -63,6 +64,10 @@ class EditContactActivity : ContactActivity() {
|
||||
private var emailViewToColor: EditText? = null
|
||||
private var originalContactSource = ""
|
||||
|
||||
private lateinit var contactFields: ArrayList<MyEditText>
|
||||
private val multipleFields = arrayListOf(::getFilledPhoneNumbers, ::getFilledEmails, ::getFilledAddresses, ::getFilledIMs,
|
||||
::getFilledEvents, ::getFilledWebsites)
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
showTransparentTop = true
|
||||
super.onCreate(savedInstanceState)
|
||||
@ -99,6 +104,12 @@ class EditContactActivity : ContactActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
contactFields = arrayListOf(contact_prefix, contact_first_name, contact_middle_name, contact_suffix, contact_nickname,
|
||||
contact_notes, contact_organization_company, contact_organization_job_position)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, resultData)
|
||||
if (resultCode == RESULT_OK) {
|
||||
@ -901,6 +912,11 @@ class EditContactActivity : ContactActivity() {
|
||||
return
|
||||
}
|
||||
|
||||
if (contactFields.all { it.value.isEmpty() } && multipleFields.all { it().isEmpty() } && currentContactPhotoPath.isEmpty()) {
|
||||
toast(R.string.fields_empty)
|
||||
return
|
||||
}
|
||||
|
||||
contact?.apply {
|
||||
val oldPhotoUri = photoUri
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">ارسال بريد الكتروني الى مجموعة</string>
|
||||
<string name="create_new_contact">إنشاء جهة إتصال</string>
|
||||
<string name="add_to_existing_contact">إضافة إلى جهة موجودة</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">لا توجد جهات اتصال بهذا البريد الالكتروني</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Grupa e-poçt göndər</string>
|
||||
<string name="create_new_contact">Create new contact</string>
|
||||
<string name="add_to_existing_contact">Add to an existing contact</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">No contacts with emails have been found</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Poslat skupině e-mail</string>
|
||||
<string name="create_new_contact">Vytvořit nový kontakt</string>
|
||||
<string name="add_to_existing_contact">Přidat k existujícímu kontaktu</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Nenalezeny žádné kontakty s e-maily</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Anfon ebost at grŵp</string>
|
||||
<string name="create_new_contact">Creu cyswllt newydd</string>
|
||||
<string name="add_to_existing_contact">Ychwanegu at gyswllt sy\'n bodoli</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Ni chanfuwyd unrhyw gysylltiadau gydag ebost</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Send email til gruppe</string>
|
||||
<string name="create_new_contact">Opret ny kontakt</string>
|
||||
<string name="add_to_existing_contact">Tilføj til en eksisterende kontakt</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Ingen kontakter med emails fundet</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">E-Mail an Gruppe senden</string>
|
||||
<string name="create_new_contact">Neuen Kontakt erstellen</string>
|
||||
<string name="add_to_existing_contact">Zu einem existierenden Kontakt hinzufügen</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Keine Kontakte mit E-Mailadressen gefunden</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Αποστολή email σε ομάδες</string>
|
||||
<string name="create_new_contact">Δημιουργία νέας Επαφής</string>
|
||||
<string name="add_to_existing_contact">Προσθήκη σε μια υπάρχουσα Επαφή</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Δεν βρέθηκαν Επαφές με emails</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Enviar correo electrónico a grupo</string>
|
||||
<string name="create_new_contact">Crear nuevo contacto</string>
|
||||
<string name="add_to_existing_contact">Añadir a un contacto existente</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">No se encontraron contactos con correo electrónico</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Bidali emaila taldeari</string>
|
||||
<string name="create_new_contact">Create new contact</string>
|
||||
<string name="add_to_existing_contact">Add to an existing contact</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">No contacts with emails have been found</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Lähetä sähköposti ryhmälle</string>
|
||||
<string name="create_new_contact">Luo uusi yhteystieto</string>
|
||||
<string name="add_to_existing_contact">Lisää olemassa olevaan yhteystietoon</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Sähköpostillisia yhteystietoja ei löytynyt</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Envoyer un courriel au groupe</string>
|
||||
<string name="create_new_contact">Créer un nouveau contact</string>
|
||||
<string name="add_to_existing_contact">Ajouter à un contact existant</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Aucun contact avec des adresses courriel n\’a été trouvé</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
<string name="create_new_contact">Create new contact</string>
|
||||
<string name="add_to_existing_contact">Add to an existing contact</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">No contacts with emails have been found</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Pošalji e-poštu grupi</string>
|
||||
<string name="create_new_contact">Stvori novi kontakt</string>
|
||||
<string name="add_to_existing_contact">Dodaj postojećem kontaktu</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Nije pronađen nijedan kontakt s e-poštom</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Email küldése csoportnak</string>
|
||||
<string name="create_new_contact">Új névjegy hozzáadása</string>
|
||||
<string name="add_to_existing_contact">Hozzáadás meglévő névjegyhez</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Nincs emailt tartalmazó névjegy.</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Kirim surel ke grup</string>
|
||||
<string name="create_new_contact">Buat kontak baru</string>
|
||||
<string name="add_to_existing_contact">Tambah ke kontak yang ada</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Tidak ada kontak dengan alamat surel yang ditemukan</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Kirim surel ke grup</string>
|
||||
<string name="create_new_contact">Buat kontak baru</string>
|
||||
<string name="add_to_existing_contact">Tambah ke kontak yang ada</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Tidak ada kontak dengan alamat surel yang ditemukan</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Invia un\'email al gruppo</string>
|
||||
<string name="create_new_contact">Crea un nuovo contatto</string>
|
||||
<string name="add_to_existing_contact">Aggiungi a un contatto esistente</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Nessun contatto trovato con un\'email</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">グループにメールを送信</string>
|
||||
<string name="create_new_contact">新しい連絡先を作成</string>
|
||||
<string name="add_to_existing_contact">既存の連絡先に追加</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">メールアドレスが登録された連絡先が見つかりません</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
<string name="create_new_contact">Create new contact</string>
|
||||
<string name="add_to_existing_contact">Add to an existing contact</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">No contacts with emails have been found</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
<string name="create_new_contact">Create new contact</string>
|
||||
<string name="add_to_existing_contact">Add to an existing contact</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">No contacts with emails have been found</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">ഗ്രൂപ്പിലേക്ക് ഇമെയിൽ അയയ്ക്കുക</string>
|
||||
<string name="create_new_contact">പുതിയ കോൺടാക്റ്റ് സൃഷ്ടിക്കുക</string>
|
||||
<string name="add_to_existing_contact">നിലവിലുള്ള കോൺടാക്റ്റിലേക്ക് ചേർക്കുക</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">ഇമെയിലുകളില്ലാത്ത കോൺടാക്റ്റുകൾ കണ്ടെത്തിയില്ല</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">E-mail naar groep sturen</string>
|
||||
<string name="create_new_contact">Nieuw contact</string>
|
||||
<string name="add_to_existing_contact">Aan bestaand contact toevoegen</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Geen contacten met e-mailadressen gevonden</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Wyślij e-mail do grupy</string>
|
||||
<string name="create_new_contact">Utwórz nowy kontakt</string>
|
||||
<string name="add_to_existing_contact">Dodaj do istniejącego kontaktu</string>
|
||||
<string name="fields_empty">Należy wypełnić co najmniej jedno pole</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Nie znaleziono kontaktów z adresami e-mail</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Enviar e-mail ao grupo</string>
|
||||
<string name="create_new_contact">Criar novo contato</string>
|
||||
<string name="add_to_existing_contact">Adicionar um contato existente</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Não foram encontrados contatos com e-mails</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Enviar e-mail para o grupo</string>
|
||||
<string name="create_new_contact">Criar novo contacto</string>
|
||||
<string name="add_to_existing_contact">Adicionar a um contacto existente</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Não existem contactos com endereço de e-mail</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Отправить письмо группе</string>
|
||||
<string name="create_new_contact">Создать новый контакт</string>
|
||||
<string name="add_to_existing_contact">Добавить к существующему контакту</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Контакты с адресами электронной почты не найдены</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Poslať skupine email</string>
|
||||
<string name="create_new_contact">Vytvoriť nový kontakt</string>
|
||||
<string name="add_to_existing_contact">Pridať k existujúcemu kontaktu</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Nenašli sa žiadne kontakty s emailami</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Skicka e-post till grupp</string>
|
||||
<string name="create_new_contact">Skapa ny kontakt</string>
|
||||
<string name="add_to_existing_contact">Lägg till i en befintlig kontakt</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Inga kontakter med e-postadresser hittades</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Gruba e-posta gönder</string>
|
||||
<string name="create_new_contact">Yeni kişi oluştur</string>
|
||||
<string name="add_to_existing_contact">Mevcut bir kişiye ekle</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">E-posta ile hiç bağlantı bulunamadı</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Надіслати електронний лист групі контактів</string>
|
||||
<string name="create_new_contact">Створити новий контакт</string>
|
||||
<string name="add_to_existing_contact">Додати до існуючого контакту</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">Не знайдено контактів з електронною поштою</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">发送电子邮件给群组</string>
|
||||
<string name="create_new_contact">建立新联系人</string>
|
||||
<string name="add_to_existing_contact">添加至已存在的联系人</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">未发现含有电子邮箱的联系人</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">發送電子郵件給群組</string>
|
||||
<string name="create_new_contact">建立新聯絡人</string>
|
||||
<string name="add_to_existing_contact">添加至已存在的聯絡人</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">未發現含有電子信箱的聯絡人</string>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="send_email_to_group">Send email to group</string>
|
||||
<string name="create_new_contact">Create new contact</string>
|
||||
<string name="add_to_existing_contact">Add to an existing contact</string>
|
||||
<string name="fields_empty">At least one field should be filled out</string>
|
||||
|
||||
<!-- Placeholders -->
|
||||
<string name="no_contacts_with_emails">No contacts with emails have been found</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user