Skip to content

Commit

Permalink
feat: implement aux configuration in Storage load/save
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Nov 27, 2019
1 parent 053a2f1 commit 7e01f2a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils/SettingsStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,19 @@ export const loadSnapshotState = (stateSnapshot: any, stateChannelSnapshot: any,
} else {
stateChannelSnapshot.channel = stateChannelSnapshot.channel.map((channel: any, index: number) => {
if (index < numberOfFaders) {
channel.auxLevel = stateFromFile.channelState.channel[index].auxLevel || []
channel.assignedFader = stateFromFile.channelState.channel[index].assignedFader
} else {
channel.assignedFader = -1
}
return channel
})

stateSnapshot.fader = stateSnapshot.fader.map((fader: any, index: number) => {
fader.monitor = stateFromFile.faderState.fader[index].monitor || -1
return fader
})

window.storeRedux.dispatch({
type: SET_COMPLETE_FADER_STATE,
allState: stateSnapshot,
Expand Down

0 comments on commit 7e01f2a

Please sign in to comment.