diff --git a/Android/app/src/main/java/com/example/mathseduc/ui/activity_quiz_multi.kt b/Android/app/src/main/java/com/example/mathseduc/ui/activity_quiz_multi.kt index 8bdd02c..59f7809 100644 --- a/Android/app/src/main/java/com/example/mathseduc/ui/activity_quiz_multi.kt +++ b/Android/app/src/main/java/com/example/mathseduc/ui/activity_quiz_multi.kt @@ -64,13 +64,13 @@ fun QuizMultiScreen(navController: NavController, lobbyId: Int?) { windowInsetsController.hide(WindowInsetsCompat.Type.systemBars()) LaunchedEffect(Unit) { - val timer = ticker(delayMillis = 100) // Update every 100 milliseconds + val timer = ticker(delayMillis = 500) // Update every 100 milliseconds for (tick in timer) { if (quizFinished) break for ((index, player) in listPlayer.withIndex()) { - progressBarValues[index] += 0.1f + progressBarValues[index] += 0.5f } - chronoValue += 0.1f + chronoValue += 0.5f if (chronoValue >= 30f) { currentQuestionIndex++ chronoValue = 0.0f diff --git a/Android/app/src/main/java/com/example/mathseduc/ui/activity_server_detail.kt b/Android/app/src/main/java/com/example/mathseduc/ui/activity_server_detail.kt index 89b8a04..c1433c5 100644 --- a/Android/app/src/main/java/com/example/mathseduc/ui/activity_server_detail.kt +++ b/Android/app/src/main/java/com/example/mathseduc/ui/activity_server_detail.kt @@ -121,6 +121,7 @@ fun ServerDetailPage(navController: NavController, serverName: String?, lobbyId: viewModel.updateIsCreator(lobbyId) if(viewModel.Launchedlobby(lobbyId)){ + /* val intent = Intent(context, QuizMultiActivity::class.java) intent.putExtra("serverName", serverName) intent.putExtra("lobbyId", lobbyId) @@ -128,6 +129,8 @@ fun ServerDetailPage(navController: NavController, serverName: String?, lobbyId: intent.putExtra("nbPlayers", nbPlayers) intent.putExtra("lobbyDifficulty", lobbyDifficulty) context.startActivity(intent) + */ + navController.navigate("quizMultiScreen/${lobbyId}") viewModel.updateRefresh(false) }