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

Commit6eddbb7

Browse files
committed
fix currentStepId on continue load
1 parentbdf0c32 commit6eddbb7

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

‎src/channel/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ class Channel implements Channel {
113113
},
114114
onError,
115115
)
116+
// update the current stepId on startup
117+
vscode.commands.executeCommand(COMMANDS.SET_CURRENT_STEP,action.payload)
116118
return
117119
// load step actions (git commits, commands, open files)
118120
case'SETUP_ACTIONS':
119-
vscode.commands.executeCommand(COMMANDS.SET_CURRENT_STEP,action.payload)
121+
awaitvscode.commands.executeCommand(COMMANDS.SET_CURRENT_STEP,action.payload)
120122
setupActions(this.workspaceRoot,action.payload,this.send)
121123
return
122124
// load solution step actions (git commits, commands, open files)

‎src/editor/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const createCommands = ({ extensionPath, workspaceState, workspaceRoot }:
8181
},
8282
[COMMANDS.RUN_TEST]:(current:Payload|undefined,onSuccess:()=>void)=>{
8383
// use stepId from client, or last set stepId
84-
constpayload:Payload={stepId:current ?current.stepId :currentStepId}
84+
constpayload:Payload={stepId:current&&current.stepId.length?current.stepId :currentStepId}
8585
testRunner(payload,onSuccess)
8686
},
8787
}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ export default {
5555
returnPromise.reject(`Failed to load tutorial config${error.message}`)
5656
})
5757
},
58-
continueConfig(){
58+
continueConfig(context:CR.MachineContext){
5959
channel.editorSend({
6060
type:'EDITOR_TUTORIAL_CONTINUE_CONFIG',
61+
payload:{
62+
// pass position because current stepId or first stepId will be empty
63+
stepId:context.position.stepId,
64+
},
6165
})
6266
},
6367
loadLevel(context:CR.MachineContext):void{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp