Bug 1744866: Observe bookmark-guid-changed event to up score. r=mak

Differential Revision: https://phabricator.services.mozilla.com/D130441
This commit is contained in:
Daisuke Akatsuka 2023-02-09 21:21:51 +00:00
parent 9cc4a6438d
commit cbc46b9b1d

View File

@ -807,6 +807,7 @@ BookmarksTracker.prototype = {
"bookmark-added",
"bookmark-removed",
"bookmark-moved",
"bookmark-guid-changed",
"bookmark-keyword-changed",
"bookmark-tags-changed",
"bookmark-time-changed",
@ -826,6 +827,7 @@ BookmarksTracker.prototype = {
"bookmark-added",
"bookmark-removed",
"bookmark-moved",
"bookmark-guid-changed",
"bookmark-keyword-changed",
"bookmark-tags-changed",
"bookmark-time-changed",
@ -883,7 +885,6 @@ BookmarksTracker.prototype = {
case "bookmark-added":
case "bookmark-removed":
case "bookmark-moved":
case "bookmark-guid-changed":
case "bookmark-keyword-changed":
case "bookmark-tags-changed":
case "bookmark-time-changed":
@ -893,6 +894,17 @@ BookmarksTracker.prototype = {
continue;
}
this._log.trace(`'${event.type}': ${event.id}`);
this._upScore();
break;
case "bookmark-guid-changed":
if (event.source !== lazy.PlacesUtils.bookmarks.SOURCES.SYNC) {
this._log.warn(
"The source of bookmark-guid-changed event shoud be sync."
);
continue;
}
this._log.trace(`'${event.type}': ${event.id}`);
this._upScore();
break;