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

Use DI correctly

This commit is contained in:
Salman Ahmed 2024-03-20 07:36:15 +03:00
parent b11ae1c571
commit 5f86b5a2fa

View File

@ -43,6 +43,7 @@ namespace osu.Desktop
[Resolved]
private OsuGame game { get; set; } = null!;
[Resolved]
private LoginOverlay? login { get; set; }
[Resolved]
@ -66,8 +67,6 @@ namespace osu.Desktop
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
login = game.Dependencies.Get<LoginOverlay>();
client = new DiscordRpcClient(client_id)
{
// SkipIdenticalPresence allows us to fire SetPresence at any point and leave it to the underlying implementation