mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Use interface to access API
Allows for better testability.
This commit is contained in:
@ -58,14 +58,14 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(OsuColour colours, APIAccess api)
|
||||
private void load(OsuColour colours, IAPIProvider api)
|
||||
{
|
||||
this.colours = colours;
|
||||
|
||||
api?.Register(this);
|
||||
}
|
||||
|
||||
public void APIStateChanged(APIAccess api, APIState state)
|
||||
public void APIStateChanged(IAPIProvider api, APIState state)
|
||||
{
|
||||
form = null;
|
||||
|
||||
@ -194,7 +194,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
private TextBox username;
|
||||
private TextBox password;
|
||||
private APIAccess api;
|
||||
private IAPIProvider api;
|
||||
|
||||
public Action RequestHide;
|
||||
|
||||
@ -205,7 +205,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(APIAccess api, OsuConfigManager config, AccountCreationOverlay accountCreation)
|
||||
private void load(IAPIProvider api, OsuConfigManager config, AccountCreationOverlay accountCreation)
|
||||
{
|
||||
this.api = api;
|
||||
Direction = FillDirection.Vertical;
|
||||
|
Reference in New Issue
Block a user