Partial sorting

This commit is contained in:
James Barnsley
2016-12-09 18:47:10 +13:00
parent f89189c715
commit 26b069faa7
7 changed files with 69 additions and 17 deletions

View File

@ -12,7 +12,7 @@ const localstorageMiddleware = (function(){
// append our state to a global variable. This gives us access to debug the store at any point
window._store = store
console.log(action)
//console.log(action)
switch( action.type ){
@ -116,10 +116,10 @@ const localstorageMiddleware = (function(){
localStorage.setItem('spotify', JSON.stringify(spotify));
break;
case 'SET_VIEW':
case 'UI_SET':
var ui = JSON.parse( localStorage.getItem('ui') );
if( !ui ) ui = {};
Object.assign( ui, action.view );
Object.assign( ui, action.data );
localStorage.setItem('ui', JSON.stringify(ui));
break;
}