mirror of https://github.com/ppy/osu
fix nullable for TeamList
This commit is contained in:
parent
cb4adf115c
commit
9482f74456
|
@ -39,7 +39,7 @@ public partial class DrawingsScreen : TournamentScreen
|
|||
|
||||
private Storage storage = null!;
|
||||
|
||||
public ITeamList? TeamList;
|
||||
public ITeamList TeamList = null!;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(Storage storage)
|
||||
|
@ -48,7 +48,8 @@ private void load(Storage storage)
|
|||
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
TeamList ??= new StorageBackedTeamList(storage);
|
||||
if (TeamList.IsNull())
|
||||
TeamList = new StorageBackedTeamList(storage);
|
||||
|
||||
if (!TeamList.Teams.Any())
|
||||
{
|
||||
|
@ -223,7 +224,7 @@ private void reloadTeams()
|
|||
teamsContainer.ClearTeams();
|
||||
allTeams.Clear();
|
||||
|
||||
foreach (TournamentTeam t in TeamList.AsNonNull().Teams)
|
||||
foreach (TournamentTeam t in TeamList.Teams)
|
||||
{
|
||||
if (groupsContainer.ContainsTeam(t.FullName.Value))
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue