czlucius / code-scanner

An Android app to scan and generate codes(barcodes/QR codes)
GNU Affero General Public License v3.0
39 stars 25 forks source link

Add contact action does not include phone number, URL, email #7

Closed czlucius closed 3 years ago

czlucius commented 3 years ago

When a contact code is scanned, and "Add Contact" is pressed, the contact's phone number, URL, and emails are always blank. This is because intent.putParcelableArrayListExtra(DATA, dataList); as seen below, called after populating the intent to add a contact, for every data type (phone number, URL, email, address), resulting in overriding this data, hence only address gets filled up.

Fix: use intent.putParcelableArrayListExtra(DATA, dataList); only at the last line.

https://github.com/czlucius/code-scanner/blob/cb762176ef5baadf46e28b1f38d8d7a6360efdc3/app/src/main/java/com/czlucius/scan/objects/actions/AddContactAction.java#L72-L114