mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
set record ID in history store when creating a record
This commit is contained in:
parent
03d78b3d84
commit
465c145c78
@ -66,12 +66,12 @@ HistoryEngine.prototype = {
|
|||||||
// History reconciliation is simpler than the default one from SyncEngine,
|
// History reconciliation is simpler than the default one from SyncEngine,
|
||||||
// because we have the advantage that we can use the URI as a definitive
|
// 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:
|
// 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,
|
// 1) Check for the same item in the locally modified list. In that case,
|
||||||
// local trumps remote. This step is unchanged from our superclass.
|
// local trumps remote. This step is unchanged from our superclass.
|
||||||
// 2) Check if the incoming item was deleted. Skip if so.
|
// 2) Check if the incoming item was deleted. Skip if so.
|
||||||
// 3) Apply new record/update.
|
// 3) Apply new record/update.
|
||||||
//
|
//
|
||||||
// Note that we don't attempt to equalize the IDs, the history store does that
|
// Note that we don't attempt to equalize the IDs, the history store does that
|
||||||
// as part of update()
|
// as part of update()
|
||||||
_reconcile: function HistEngine__reconcile(item) {
|
_reconcile: function HistEngine__reconcile(item) {
|
||||||
@ -398,7 +398,7 @@ HistoryStore.prototype = {
|
|||||||
}
|
}
|
||||||
this._hsvc.setPageTitle(uri, record.cleartext.title);
|
this._hsvc.setPageTitle(uri, record.cleartext.title);
|
||||||
|
|
||||||
// Equalize IDs
|
// Equalize IDs
|
||||||
let localId = this._getGUID(record.cleartext.uri);
|
let localId = this._getGUID(record.cleartext.uri);
|
||||||
if (localId != record.id)
|
if (localId != record.id)
|
||||||
this.changeItemID(localId, record.id);
|
this.changeItemID(localId, record.id);
|
||||||
@ -420,6 +420,7 @@ HistoryStore.prototype = {
|
|||||||
createRecord: function HistStore_createRecord(guid) {
|
createRecord: function HistStore_createRecord(guid) {
|
||||||
let foo = this._findURLByGUID(guid);
|
let foo = this._findURLByGUID(guid);
|
||||||
let record = new HistoryRec();
|
let record = new HistoryRec();
|
||||||
|
record.id = guid;
|
||||||
if (foo) {
|
if (foo) {
|
||||||
record.histUri = foo.url;
|
record.histUri = foo.url;
|
||||||
record.title = foo.title;
|
record.title = foo.title;
|
||||||
|
Loading…
Reference in New Issue
Block a user