Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit16accb5

Browse files
committed
load to exact point on continue
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent0e81b82 commit16accb5

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

‎web-app/src/services/state/actions/context.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,18 @@ export const clearError = assign({
113113
})
114114

115115
exportconstcheckLevelCompleted=send((context:T.MachineContext)=>{
116-
// no step id indicates no steps to complete
117-
logger(context.position)
116+
constcurrentLevel=selectors.currentLevel(context)
117+
lethasNoSteps=false
118+
letfinalStepComplete=false
119+
if(!currentLevel.steps.length){
120+
hasNoSteps=true
121+
}else{
122+
constfinalStep=currentLevel.steps[currentLevel.steps.length-1]
123+
finalStepComplete=finalStep.id===context.position.stepId&&context.position.complete
124+
}
125+
118126
return{
119-
type:context.position.stepId===null ?'START_COMPLETED_LEVEL' :'START_LEVEL',
127+
type:hasNoSteps||finalStepComplete ?'START_COMPLETED_LEVEL' :'START_LEVEL',
120128
}
121129
})
122130

‎web-app/src/services/state/actions/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default (editorSend: any) => ({
129129
editorSend({
130130
type:'EDITOR_SYNC_POSITION',
131131
payload:{
132-
position:{ ...context.position,complete:true},
132+
position:context.position,
133133
},
134134
})
135135
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp