1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

Fix incorrect end date usage in timeshift ready button

This commit is contained in:
smoogipoo 2020-12-20 18:44:36 +09:00
parent 6efe24695b
commit 19db35501e

View File

@ -13,7 +13,7 @@ namespace osu.Game.Screens.Multi.Timeshift
public class TimeshiftReadyButton : ReadyButton
{
[Resolved(typeof(Room), nameof(Room.EndDate))]
private Bindable<DateTimeOffset?> endDate { get; set; }
private Bindable<DateTimeOffset> endDate { get; set; }
public TimeshiftReadyButton()
{
@ -32,7 +32,7 @@ namespace osu.Game.Screens.Multi.Timeshift
{
base.Update();
Enabled.Value = endDate.Value == null || DateTimeOffset.UtcNow.AddSeconds(30).AddMilliseconds(GameBeatmap.Value.Track.Length) < endDate.Value;
Enabled.Value = DateTimeOffset.UtcNow.AddSeconds(30).AddMilliseconds(GameBeatmap.Value.Track.Length) < endDate.Value;
}
}
}