mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
sync bookmark descriptions
This commit is contained in:
parent
cb3252bd8d
commit
036c817866
@ -361,6 +361,11 @@ BookmarksStore.prototype = {
|
|||||||
this._ts.untagURI(URI, null);
|
this._ts.untagURI(URI, null);
|
||||||
this._ts.tagURI(URI, command.data.tags);
|
this._ts.tagURI(URI, command.data.tags);
|
||||||
this._bms.setKeywordForBookmark(newId, command.data.keyword);
|
this._bms.setKeywordForBookmark(newId, command.data.keyword);
|
||||||
|
if (command.data.description) {
|
||||||
|
this._ans.setItemAnnotation(newId, "bookmarkProperties/description",
|
||||||
|
command.data.description, 0,
|
||||||
|
this._ans.EXPIRE_NEVER);
|
||||||
|
}
|
||||||
|
|
||||||
if (command.data.type == "microsummary") {
|
if (command.data.type == "microsummary") {
|
||||||
this._log.debug(" \-> is a microsummary");
|
this._log.debug(" \-> is a microsummary");
|
||||||
@ -497,6 +502,13 @@ BookmarksStore.prototype = {
|
|||||||
case "keyword":
|
case "keyword":
|
||||||
this._bms.setKeywordForBookmark(itemId, command.data.keyword);
|
this._bms.setKeywordForBookmark(itemId, command.data.keyword);
|
||||||
break;
|
break;
|
||||||
|
case "description":
|
||||||
|
if (command.data.description) {
|
||||||
|
this._ans.setItemAnnotation(itemId, "bookmarkProperties/description",
|
||||||
|
command.data.description, 0,
|
||||||
|
this._ans.EXPIRE_NEVER);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "generatorURI": {
|
case "generatorURI": {
|
||||||
let micsumURI = Utils.makeURI(this._bms.getBookmarkURI(itemId));
|
let micsumURI = Utils.makeURI(this._bms.getBookmarkURI(itemId));
|
||||||
let genURI = Utils.makeURI(command.data.generatorURI);
|
let genURI = Utils.makeURI(command.data.generatorURI);
|
||||||
@ -573,6 +585,14 @@ BookmarksStore.prototype = {
|
|||||||
item.type = "bookmark";
|
item.type = "bookmark";
|
||||||
item.title = node.title;
|
item.title = node.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
item.description =
|
||||||
|
this._ans.getItemAnnotation(node.itemId, "bookmarkProperties/description");
|
||||||
|
} catch (e) {
|
||||||
|
item.description = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
item.URI = node.uri;
|
item.URI = node.uri;
|
||||||
item.tags = this._ts.getTagsForURI(Utils.makeURI(node.uri), {});
|
item.tags = this._ts.getTagsForURI(Utils.makeURI(node.uri), {});
|
||||||
item.keyword = this._bms.getKeywordForBookmark(node.itemId);
|
item.keyword = this._bms.getKeywordForBookmark(node.itemId);
|
||||||
|
Loading…
Reference in New Issue
Block a user