Use [Resolved] wherever possible

This commit is contained in:
recapitalverb
2020-02-14 20:14:00 +07:00
parent 6d87d22a84
commit c753cb46c5
35 changed files with 128 additions and 169 deletions

View File

@ -48,7 +48,8 @@ namespace osu.Game.Online.Chat
/// </summary>
public IBindableList<Channel> AvailableChannels => availableChannels;
private IAPIProvider api;
[Resolved]
private IAPIProvider api { get; set; }
public readonly BindableBool HighPollRate = new BindableBool();
@ -466,12 +467,6 @@ namespace osu.Game.Online.Chat
api.Queue(req);
}
[BackgroundDependencyLoader]
private void load(IAPIProvider api)
{
this.api = api;
}
}
/// <summary>

View File

@ -13,15 +13,17 @@ namespace osu.Game.Online.Chat
{
public class ExternalLinkOpener : Component
{
private GameHost host;
private DialogOverlay dialogOverlay;
[Resolved]
private GameHost host { get; set; }
[Resolved]
private DialogOverlay dialogOverlay { get; set; }
private Bindable<bool> externalLinkWarning;
[BackgroundDependencyLoader(true)]
private void load(GameHost host, DialogOverlay dialogOverlay, OsuConfigManager config)
private void load(OsuConfigManager config)
{
this.host = host;
this.dialogOverlay = dialogOverlay;
externalLinkWarning = config.GetBindable<bool>(OsuSetting.ExternalLinkWarning);
}