some cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-12-12 05:05:38 +03:00
parent 57b41d04a1
commit 5985e09465

View File

@ -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...