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

Improvement: Update thumbnails when url has changed

This commit is contained in:
MatMoul 2017-10-15 00:51:50 +02:00
parent 39f96b015b
commit 9c907f37e0

View File

@ -448,12 +448,14 @@ app.GridNodes.getNodeWithParents = function(id){
app.GridNodes.updateNode = function(gridNode, value, callback){
if(value){
if(value.title) gridNode.title = value.title;
if(gridNode.type == app.GridNodes.GridNodeType.bookmark && value.url && gridNode.url != value.url){
gridNode.url = value.url;
delete gridNode.image;
}
if(value.image) gridNode.image = value.image;
else delete gridNode.image;
if(gridNode.type == app.GridNodes.GridNodeType.bookmark && value.url && gridNode.url != value.url){
gridNode.url = value.url;
app.GridNodes.refreshNode(gridNode, function(){
browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded });
});
}
app.GridNodes.saveNode(gridNode);
}
if(callback) callback(gridNode);