mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 03:53:09 +08:00
Fixing clone issue adding photos, removing relationships
This commit is contained in:
parent
cd2e86af2f
commit
64310dc85c
@ -24,9 +24,7 @@
|
|||||||
* @param {ContactField[]} photos
|
* @param {ContactField[]} photos
|
||||||
* @param {ContactField[]} categories
|
* @param {ContactField[]} categories
|
||||||
* @param {ContactField[]} urls contact's web sites
|
* @param {ContactField[]} urls contact's web sites
|
||||||
* @param {ContactAccounts[]} accounts contact's online accounts
|
* @param {DOMString} timezone the contacts time zone
|
||||||
* @param {DOMString} utcOffset UTC time zone offset
|
|
||||||
* @param {DOMString} connected
|
|
||||||
*/
|
*/
|
||||||
var Contact = function(id, displayName, name, nickname, phoneNumbers, emails, addresses,
|
var Contact = function(id, displayName, name, nickname, phoneNumbers, emails, addresses,
|
||||||
ims, organizations, revision, birthday, gender, note, photos, categories, urls, timezone) {
|
ims, organizations, revision, birthday, gender, note, photos, categories, urls, timezone) {
|
||||||
@ -106,9 +104,9 @@ Contact.prototype.clone = function() {
|
|||||||
clonedContact.tags[i].id = null;
|
clonedContact.tags[i].id = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (clonedContact.relationships) {
|
if (clonedContact.photos) {
|
||||||
for (i=0; i<clonedContact.relationships.length; i++) {
|
for (i=0; i<clonedContact.photos.length; i++) {
|
||||||
clonedContact.relationships[i].id = null;
|
clonedContact.photos[i].id = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (clonedContact.urls) {
|
if (clonedContact.urls) {
|
||||||
@ -151,7 +149,7 @@ var ContactName = function(formatted, familyName, givenName, middle, prefix, suf
|
|||||||
* @param {DOMString} id unique identifier, should only be set by native code
|
* @param {DOMString} id unique identifier, should only be set by native code
|
||||||
* @param type
|
* @param type
|
||||||
* @param value
|
* @param value
|
||||||
* @param primary
|
* @param pref
|
||||||
*/
|
*/
|
||||||
var ContactField = function(type, value, pref) {
|
var ContactField = function(type, value, pref) {
|
||||||
this.id = null;
|
this.id = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user