|
|
@ -155,7 +155,7 @@ fun QuizMultiScreen(navController: NavController, lobbyId: Int?) {
|
|
|
|
Button(
|
|
|
|
Button(
|
|
|
|
onClick = {
|
|
|
|
onClick = {
|
|
|
|
if (answer.id == currentQuestion.idanswergood) {
|
|
|
|
if (answer.id == currentQuestion.idanswergood) {
|
|
|
|
Toast.makeText(context, "Oh ouii !!", Toast.LENGTH_SHORT).show()
|
|
|
|
Toast.makeText(context, "Réussi !!", Toast.LENGTH_SHORT).show()
|
|
|
|
|
|
|
|
|
|
|
|
val formDataBuilder = MultipartBody.Builder().setType(MultipartBody.FORM)
|
|
|
|
val formDataBuilder = MultipartBody.Builder().setType(MultipartBody.FORM)
|
|
|
|
val playertime = ControllerLobby.getLobbyUtiliserPlayerTime(lobbyId!!,MainActivity.idPlayerConnected) + 10
|
|
|
|
val playertime = ControllerLobby.getLobbyUtiliserPlayerTime(lobbyId!!,MainActivity.idPlayerConnected) + 10
|
|
|
@ -163,7 +163,7 @@ fun QuizMultiScreen(navController: NavController, lobbyId: Int?) {
|
|
|
|
|
|
|
|
|
|
|
|
ControllerLobby.updateLobbyUtiliserPlayerTime(lobbyId,MainActivity.idPlayerConnected,formDataBuilder)
|
|
|
|
ControllerLobby.updateLobbyUtiliserPlayerTime(lobbyId,MainActivity.idPlayerConnected,formDataBuilder)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Toast.makeText(context, "Oh nan !!", Toast.LENGTH_SHORT).show()
|
|
|
|
Toast.makeText(context, "Raté !!", Toast.LENGTH_SHORT).show()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
viewModel.resetChronoValue()
|
|
|
|
viewModel.resetChronoValue()
|
|
|
|
viewModel.updateCurrentQuestionIndex()
|
|
|
|
viewModel.updateCurrentQuestionIndex()
|
|
|
|