fix that it goes to endscreen at end
This commit is contained in:
@@ -183,16 +183,13 @@ public class FitnessActivity extends RobotActivity implements RobotLifecycleCall
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (EXERCISE_REP == 10) {
|
|
||||||
Intent intent = new Intent(FitnessActivity.this, EndScreenActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
videoView.setOnCompletionListener(mp -> {
|
videoView.setOnCompletionListener(mp -> {
|
||||||
if (EXERCISE_VIDEO_REPETITION < ExerciseManager.DEFAULT_EXERCISE_REPETITIONS) {
|
if (EXERCISE_VIDEO_REPETITION < ExerciseManager.DEFAULT_EXERCISE_REPETITIONS) {
|
||||||
videoView.start(); // start the video again
|
videoView.start(); // start the video again
|
||||||
EXERCISE_VIDEO_REPETITION++;
|
EXERCISE_VIDEO_REPETITION++;
|
||||||
|
if (progress >= 10) {
|
||||||
|
runOnUiThread(() -> NavigationManager.navigateToActivity(this, EndScreenActivity.class));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user