mirror of https://github.com/ppy/osu
Automatically fix invalid pairing dates on load (based on contained groupings)
This commit is contained in:
parent
f083b18663
commit
8907ce3f63
|
@ -109,7 +109,12 @@ private void load(Storage storage, FrameworkConfigManager frameworkConfig)
|
|||
foreach (var id in group.Pairings)
|
||||
{
|
||||
var found = Ladder.Pairings.FirstOrDefault(p => p.ID == id);
|
||||
if (found != null) found.Grouping.Value = group;
|
||||
if (found != null)
|
||||
{
|
||||
found.Grouping.Value = group;
|
||||
if (group.StartDate.Value > found.Date.Value)
|
||||
found.Date.Value = group.StartDate.Value;
|
||||
}
|
||||
}
|
||||
|
||||
Ladder.CurrentMatch.Value = Ladder.Pairings.FirstOrDefault(p => p.Current.Value);
|
||||
|
|
Loading…
Reference in New Issue