From 190d54a0f1ad934ac04705d29d0f2860253e1c00 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sat, 18 Nov 2017 23:47:05 +0100 Subject: [PATCH] Bug: Settings page save problem --- src/js/background.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/js/background.js b/src/js/background.js index 356f935..186ebfa 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -539,24 +539,25 @@ app.GridNodes.updateNode = function(gridNode, value, callback){ gridNode.url = value.url; app.GridNodes.refreshNode(gridNode, function(){ browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded }); + app.GridNodes.saveNode(gridNode); var data = { title: gridNode.title }; - if(gridNode.imageMode) data.imageMode = gridNode.imageMode; - if(gridNode.type == app.GridNodes.GridNodeType.bookmark) data.url = gridNode.url; + //if(gridNode.imageMode) data.imageMode = gridNode.imageMode; + //if(gridNode.type == app.GridNodes.GridNodeType.bookmark) data.url = 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); }); } else { browser.runtime.sendMessage({ cmd: app.Messages.Commands.gridNodesLoaded }); + app.GridNodes.saveNode(gridNode); var data = { title: gridNode.title }; - if(gridNode.imageMode) data.imageMode = gridNode.imageMode; + //if(gridNode.imageMode) data.imageMode = gridNode.imageMode; 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); } } if(callback) callback(gridNode);