do not allow removing the original contact from ThreadActivity

This commit is contained in:
tibbi 2020-04-06 21:43:07 +02:00
parent c4f209b8ff
commit 4405495e6b
1 changed files with 3 additions and 1 deletions

View File

@ -142,7 +142,9 @@ class ThreadActivity : SimpleActivity() {
layoutInflater.inflate(R.layout.item_selected_contact, null).apply {
selected_contact_name.text = contact.name
selected_contact_remove.setOnClickListener {
removeSelectedContact(contact.id)
if (contact.id != selectedContacts.first().id) {
removeSelectedContact(contact.id)
}
}
views.add(this)
}