From 5985e09465b49021769d555bbd57de55b1b5081c Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 12 Dec 2015 05:05:38 +0300 Subject: [PATCH] some cleanup... Signed-off-by: Alex A. Naanou --- ui (gen4)/viewer.js | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 72c32da7..8ba950e5 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -1721,25 +1721,25 @@ var ConfigLocalStorageActions = actions.Actions({ function(key){ var key = key || this.config['config-local-storage-key'] - // build a diff... - if(this.config['config-local-storage-save-diff']){ - var base = this.__base_config || {} - var cur = this.config - var config = {} - Object.keys(cur) - .forEach(function(e){ - if(cur.hasOwnProperty(e) && base[e] != cur[e]){ - config[e] = cur[e] - } - }) - console.log('!!!!', config) - - // full save... - } else { - var config = this.config - } - if(key != null){ + // build a diff... + if(this.config['config-local-storage-save-diff']){ + var base = this.__base_config || {} + var cur = this.config + var config = {} + Object.keys(cur) + .forEach(function(e){ + if(cur.hasOwnProperty(e) && base[e] != cur[e]){ + config[e] = cur[e] + } + }) + + // full save... + } else { + var config = this.config + } + + // store... localStorage[key] = JSON.stringify(config) } }], @@ -3690,7 +3690,6 @@ var AppControlActions = actions.Actions({ 'application-window': null, 'window-title': 'ImageGrid.Viewer (${VERSION}): ${FILENAME}', - 'window-title': 'ImageGrid.Viewer (${VERSION}): ${FILENAME}', }, // XXX revise these...