mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2024-12-23 07:26:11 +00:00
Improvement: Update thumbnails when url has changed
This commit is contained in:
parent
39f96b015b
commit
9c907f37e0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user