Fixed adding of new contact
This commit is contained in:
@@ -204,6 +204,10 @@ sealed class Contact {
|
|||||||
BaresipService.contactUpdate.postValue(System.nanoTime())
|
BaresipService.contactUpdate.postValue(System.nanoTime())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun addBaresipContact(contact: BaresipContact) {
|
||||||
|
BaresipService.baresipContacts.add(contact)
|
||||||
|
}
|
||||||
|
|
||||||
fun removeBaresipContact(contact: BaresipContact) {
|
fun removeBaresipContact(contact: BaresipContact) {
|
||||||
BaresipService.baresipContacts.remove(contact)
|
BaresipService.baresipContacts.remove(contact)
|
||||||
saveBaresipContacts()
|
saveBaresipContacts()
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ class ContactActivity : AppCompatActivity() {
|
|||||||
addOrUpdateAndroidContact(this, contact)
|
addOrUpdateAndroidContact(this, contact)
|
||||||
} else {
|
} else {
|
||||||
if (newContact)
|
if (newContact)
|
||||||
Contact.contacts().add(contact)
|
Contact.addBaresipContact(contact)
|
||||||
Contact.saveBaresipContacts()
|
Contact.saveBaresipContacts()
|
||||||
Contact.contactsUpdate()
|
Contact.contactsUpdate()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user