Fixed issue with Gab Deck reordering and deleting columns not working
• Fixed: - issue with Gab Deck reordering and deleting columns not working because of unsaved settings reducer
This commit is contained in:
parent
0a4c31d39e
commit
aa750565f0
@ -91,13 +91,13 @@ export default function settings(state = initialState, action) {
|
||||
const newIndex = Math.min(Math.max(action.index || 0, sizeOfDeck), GAB_DECK_MAX_ITEMS)
|
||||
return state.setIn(['gabDeckOrder', newIndex + 1], action.column).set('saved', false)
|
||||
case DECK_DELETE_COLUMN_AT_INDEX:
|
||||
return state.deleteIn(['gabDeckOrder', action.index])
|
||||
return state.deleteIn(['gabDeckOrder', action.index]).set('saved', false)
|
||||
case DECK_CHANGE_COLUMN_AT_INDEX:
|
||||
return state.update('gabDeckOrder', idsList => idsList.withMutations((list) => {
|
||||
let soruce = list.get(action.oldIndex)
|
||||
let destination = list.get(action.newIndex)
|
||||
return list.set(action.newIndex, soruce).set(action.oldIndex, destination)
|
||||
}))
|
||||
})).set('saved', false)
|
||||
default:
|
||||
return state
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user