🐛 répare la sauvegarde des données avec le nouvel état

pull/256/head
Johan Girod 2018-06-19 17:23:16 +02:00
parent e111a2694f
commit 86ae5102e0
3 changed files with 8 additions and 4 deletions

View File

@ -20,7 +20,6 @@ import {
targetNames: state.targetNames,
conversationStarted: state.conversationStarted,
themeColours: state.themeColours,
foldedSteps: state.foldedSteps,
flatRules: flatRulesSelector(state),
currentQuestion: currentQuestionSelector(state)
}))

View File

@ -8,7 +8,7 @@ const situationSelector: State => Situation = state =>
export const currentSimulationSelector: State => SavedSimulation = state => ({
situation: situationSelector(state),
activeTargetInput: state.activeTargetInput,
foldedSteps: state.foldedSteps
foldedSteps: state.conversationSteps.foldedSteps
})
export const createStateFromSavedSimulation: (
@ -21,7 +21,9 @@ export const createStateFromSavedSimulation: (
values: simulation.situation
}
},
foldedSteps: simulation.foldedSteps,
conversationSteps: {
foldedSteps: simulation.foldedSteps
},
conversationStarted: true,
previousSimulation: null
}

View File

@ -24,7 +24,10 @@ export type State = {
}
},
previousSimulation: ?SavedSimulation,
foldedSteps: Array<string>,
conversationSteps: {
foldedSteps: Array<string>,
currentQuestion: ?string
},
activeTargetInput: TargetInput,
conversationStarted: boolean
}