1
0
mirror of https://github.com/MatMoul/quickdial-webext.git synced 2024-12-23 15:36:12 +00:00

Improvement: Update bookmark when setting tile parameters

This commit is contained in:
MatMoul 2017-11-10 22:48:12 +01:00
parent 7f719497dc
commit dd95e95b20

View File

@ -500,6 +500,12 @@ app.GridNodes.updateNode = function(gridNode, value, callback){
gridNode.url = value.url; gridNode.url = value.url;
app.GridNodes.refreshNode(gridNode, function(){ app.GridNodes.refreshNode(gridNode, function(){
browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded }); browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded });
var data = { title: gridNode.title };
if(gridNode.url) data.url = gridNode.url;
browser.bookmarks.onChanged.removeListener(app.Bookmarks._onChanged);
browser.bookmarks.update(gridNode.id, data).then(function(){
browser.bookmarks.onChanged.addListener(app.Bookmarks._onChanged);
});
}); });
} }
app.GridNodes.saveNode(gridNode); app.GridNodes.saveNode(gridNode);