mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 915987 - Part 1: reuse nsIDOMContact.id. r=vicamo
This commit is contained in:
parent
b9587869f5
commit
2ca3a937e0
@ -1025,6 +1025,8 @@ RILContentHelper.prototype = {
|
||||
iccContact.email = contact.email[0].value;
|
||||
}
|
||||
|
||||
iccContact.id = contact.id;
|
||||
|
||||
cpmm.sendAsyncMessage("RIL:UpdateIccContact", {
|
||||
clientId: 0,
|
||||
data: {
|
||||
@ -1683,6 +1685,7 @@ RILContentHelper.prototype = {
|
||||
}
|
||||
|
||||
contact.init(prop);
|
||||
contact.id = message.iccid + c.recordId;
|
||||
return contact;
|
||||
});
|
||||
|
||||
|
@ -876,6 +876,7 @@ let RIL = {
|
||||
function onsuccess(contacts) {
|
||||
// Reuse 'options' to get 'requestId' and 'contactType'.
|
||||
options.contacts = contacts;
|
||||
options.iccid = RIL.iccInfo.iccid;
|
||||
RIL.sendChromeMessage(options);
|
||||
}.bind(this),
|
||||
function onerror(errorMsg) {
|
||||
@ -908,6 +909,16 @@ let RIL = {
|
||||
return;
|
||||
}
|
||||
|
||||
let contact = options.contact;
|
||||
let iccid = RIL.iccInfo.iccid;
|
||||
if (contact.id.startsWith(iccid)) {
|
||||
contact.recordId = contact.id.substring(iccid.length);
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
debug("Update ICC Contact " + JSON.stringify(contact));
|
||||
}
|
||||
|
||||
// If contact has 'recordId' property, updates corresponding record.
|
||||
// If not, inserts the contact into a free record.
|
||||
if (options.contact.recordId) {
|
||||
|
Loading…
Reference in New Issue
Block a user