mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Remove CachedModelDependencyContainer
usages from online play
This commit is contained in:
parent
bfbae9458a
commit
1a656d0ec3
@ -26,11 +26,6 @@ namespace osu.Game.Tests.Visual.DailyChallenge
|
||||
|
||||
private readonly Bindable<Room> room = new Bindable<Room>(new Room());
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) => new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent))
|
||||
{
|
||||
Model = { BindTarget = room }
|
||||
};
|
||||
|
||||
[Test]
|
||||
public void TestBasicAppearance()
|
||||
{
|
||||
|
@ -18,11 +18,6 @@ namespace osu.Game.Tests.Visual.DailyChallenge
|
||||
{
|
||||
private readonly Bindable<Room> room = new Bindable<Room>(new Room());
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) => new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent))
|
||||
{
|
||||
Model = { BindTarget = room }
|
||||
};
|
||||
|
||||
[Cached]
|
||||
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Plum);
|
||||
|
||||
|
@ -43,9 +43,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
private OsuButton readyButton => control.ChildrenOfType<OsuButton>().Single();
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
||||
new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent)) { Model = { BindTarget = room } };
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
@ -18,10 +17,6 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
private readonly Mock<MultiplayerClient> multiplayerClient = new Mock<MultiplayerClient>();
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
||||
// not used directly in component, but required due to it inheriting from OnlinePlayComposite.
|
||||
new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent));
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
@ -119,14 +119,6 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
||||
Padding = new MarginPadding { Horizontal = -HORIZONTAL_OVERFLOW_PADDING };
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
return new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent))
|
||||
{
|
||||
Model = { Value = room }
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
|
@ -316,14 +316,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
passwordIcon.Alpha = Room.HasPassword ? 1 : 0;
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
return new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent))
|
||||
{
|
||||
Model = { Value = Room }
|
||||
};
|
||||
}
|
||||
|
||||
private int numberOfAvatars = 7;
|
||||
|
||||
public int NumberOfAvatars
|
||||
|
@ -287,14 +287,6 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
}
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
return new CachedModelDependencyContainer<Room>(base.CreateChildDependencies(parent))
|
||||
{
|
||||
Model = { Value = Room }
|
||||
};
|
||||
}
|
||||
|
||||
protected virtual bool IsConnected => api.State.Value == APIState.Online;
|
||||
|
||||
public override bool OnBackButton()
|
||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
||||
UserLookupCache = new TestUserLookupCache();
|
||||
BeatmapLookupCache = new BeatmapLookupCache();
|
||||
|
||||
dependencies = new DependencyContainer(new CachedModelDependencyContainer<Room>(null) { Model = { BindTarget = SelectedRoom } });
|
||||
dependencies = new DependencyContainer();
|
||||
|
||||
CacheAs(RequestsHandler);
|
||||
CacheAs(SelectedRoom);
|
||||
|
Loading…
Reference in New Issue
Block a user