Skip to content

Commit

Permalink
Show level collection header when playlist is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Meivyn committed Jun 19, 2024
1 parent e1325ad commit a5f620e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ public class LevelCollectionViewController_SetData
{
internal static IReadOnlyCollection<BeatmapLevel> beatmapLevels { get; private set; }

internal static void Prefix(BeatmapLevel[] beatmapLevels)
private static void Prefix(BeatmapLevel[] beatmapLevels)
{
LevelCollectionViewController_SetData.beatmapLevels = beatmapLevels ?? Array.Empty<BeatmapLevel>();
}

private static void Postfix(LevelCollectionViewController __instance)
{
if (beatmapLevels.Count == 0)
{
__instance._levelCollectionTableView.gameObject.SetActive(true);
}
}
}
}

0 comments on commit a5f620e

Please sign in to comment.