diff --git a/vds-app/App/screens/Exam.js b/vds-app/App/screens/Exam.js index 204cf10..4aa7998 100644 --- a/vds-app/App/screens/Exam.js +++ b/vds-app/App/screens/Exam.js @@ -70,7 +70,9 @@ class Exam extends React.Component { return nextState }, () => { - setTimeout(() => this.nextQuestion(), 750) + if(this.state.timer > 1 || (this.state.correctCount+this.state.wrongCount) < this.state.totalCount) { + setTimeout(() => this.nextQuestion(), 750) + } } ) } @@ -79,7 +81,7 @@ class Exam extends React.Component { this.setState( (state) => { const updatedIndexes = state.availableIds.filter( item => item != state.activeQuestionId) const nextId = updatedIndexes[Math.floor(Math.random() * updatedIndexes.length)] - let resultsShow = this.state.timer <= 1 || false + let resultsShow = (this.state.timer <= 1 || (this.state.correctCount+this.state.wrongCount) == this.state.totalCount) ? true : false if (!updatedIndexes.length) { resultsShow = true @@ -112,7 +114,7 @@ class Exam extends React.Component { }, 1000) } - if(this.state.timer < 1) { + if(this.state.timer < 1 || (this.state.correctCount+this.state.wrongCount) == this.state.totalCount) { clearInterval(interval) setTimeout( () => { this.props.navigation.popToTop() diff --git a/vds-app/app.json b/vds-app/app.json index 0b3688b..625d469 100644 --- a/vds-app/app.json +++ b/vds-app/app.json @@ -7,7 +7,7 @@ "platforms": ["ios", "android"], "version": "1.0.0", "orientation": "portrait", - "icon": "./assets/logo.png", + "icon": "./assets/icon.png", "splash": { "image": "./assets/splash.png", "resizeMode": "cover",