|
|
|
@ -224,13 +224,15 @@ class MainContentContainer extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
|
|
|
const { game } = this.props
|
|
|
|
|
const { game, challenge } = this.props
|
|
|
|
|
|
|
|
|
|
if (game && prevProps.game
|
|
|
|
|
&& prevProps.game.identifier !== game.identifier) {
|
|
|
|
|
// 切换关卡时,停止轮训
|
|
|
|
|
this.oldGameIdentifier = prevProps.game.identifier;
|
|
|
|
|
this.doFileUpdateRequestOnCodeMirrorBlur(prevProps)
|
|
|
|
|
} else if (challenge && (challenge.pathIndex || prevProps.challenge.pathIndex) && challenge.pathIndex != prevProps.challenge.pathIndex) {
|
|
|
|
|
this.doFileUpdateRequestOnCodeMirrorBlur(prevProps)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|