fix: currentQuestion => currentQuestionId

This commit is contained in:
Fangh 2024-01-28 23:04:14 +01:00
parent f01d2e4227
commit 6122b747de
2 changed files with 3 additions and 3 deletions

View File

@ -403,7 +403,7 @@ private void OnRoomUpdate(object sender, ValueChangedEventArgs e)
{ {
TakePicture.SetActive(false); TakePicture.SetActive(false);
VotePicture.SetActive(true); VotePicture.SetActive(true);
myOnlineRoom.Child("currentQuestion").ValueChanged += OnCurrentQuestionChanged; myOnlineRoom.Child("currentQuestionId").ValueChanged += OnCurrentQuestionChanged;
} }
break; break;
} }
@ -414,7 +414,7 @@ private void OnRoomUpdate(object sender, ValueChangedEventArgs e)
VotePicture.SetActive(false); VotePicture.SetActive(false);
WaitingOtherPlayers.SetActive(false); WaitingOtherPlayers.SetActive(false);
EndGame.SetActive(true); EndGame.SetActive(true);
myOnlineRoom.Child("currentQuestion").ValueChanged -= OnCurrentQuestionChanged; myOnlineRoom.Child("currentQuestionId").ValueChanged -= OnCurrentQuestionChanged;
} }
break; break;
} }

View File

@ -77,7 +77,7 @@ public void ShowVotingPage(DatabaseReference _roomRef, Dictionary<string, Player
} }
currentQuestion = remainingQuestions.Dequeue(); currentQuestion = remainingQuestions.Dequeue();
roomRef.Child("currentQuestion").SetValueAsync(currentQuestion.index); roomRef.Child("currentQuestionId").SetValueAsync(currentQuestion.index);
ShowQuestion(); ShowQuestion();
} }