Fix incorrect event binding

This commit is contained in:
Dan Balasescu 2022-03-24 17:11:08 +09:00
parent dfa076c169
commit 528ffea38d
1 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ protected override void LoadComplete()
{
base.LoadComplete();
multiplayerClient.RoomUpdated += () => Scheduler.AddOnce(onRoomUpdated);
multiplayerClient.RoomUpdated += onRoomUpdated;
onRoomUpdated();
}
@ -39,7 +39,7 @@ protected override void LoadComplete()
private DateTimeOffset countdownReceivedTime;
private ScheduledDelegate countdownUpdateDelegate;
private void onRoomUpdated()
private void onRoomUpdated() => Scheduler.AddOnce(() =>
{
if (countdown == null && room?.Countdown != null)
countdownReceivedTime = DateTimeOffset.Now;
@ -56,7 +56,7 @@ private void onRoomUpdated()
updateButtonText();
updateButtonColour();
}
});
private void updateButtonText()
{