зеркало из https://github.com/mozilla/pjs.git
set record ID in history store when creating a record
This commit is contained in:
Родитель
ec75cd2b3d
Коммит
4a1427278e
|
@ -66,12 +66,12 @@ HistoryEngine.prototype = {
|
|||
// History reconciliation is simpler than the default one from SyncEngine,
|
||||
// because we have the advantage that we can use the URI as a definitive
|
||||
// check for local existence of incoming items. The steps are as follows:
|
||||
//
|
||||
//
|
||||
// 1) Check for the same item in the locally modified list. In that case,
|
||||
// local trumps remote. This step is unchanged from our superclass.
|
||||
// 2) Check if the incoming item was deleted. Skip if so.
|
||||
// 3) Apply new record/update.
|
||||
//
|
||||
//
|
||||
// Note that we don't attempt to equalize the IDs, the history store does that
|
||||
// as part of update()
|
||||
_reconcile: function HistEngine__reconcile(item) {
|
||||
|
@ -398,7 +398,7 @@ HistoryStore.prototype = {
|
|||
}
|
||||
this._hsvc.setPageTitle(uri, record.cleartext.title);
|
||||
|
||||
// Equalize IDs
|
||||
// Equalize IDs
|
||||
let localId = this._getGUID(record.cleartext.uri);
|
||||
if (localId != record.id)
|
||||
this.changeItemID(localId, record.id);
|
||||
|
@ -420,6 +420,7 @@ HistoryStore.prototype = {
|
|||
createRecord: function HistStore_createRecord(guid) {
|
||||
let foo = this._findURLByGUID(guid);
|
||||
let record = new HistoryRec();
|
||||
record.id = guid;
|
||||
if (foo) {
|
||||
record.histUri = foo.url;
|
||||
record.title = foo.title;
|
||||
|
|
Загрузка…
Ссылка в новой задаче