mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Construct notifications client via IAPIProvider
This commit is contained in:
@ -14,7 +14,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Online.Notifications.Polling;
|
||||
using osu.Game.Overlays.Chat;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@ -42,7 +41,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
linkColour = colours.Blue;
|
||||
|
||||
var chatManager = new ChannelManager(API, new PollingNotificationsClientConnector(API));
|
||||
var chatManager = new ChannelManager(API, API.GetNotificationsConnector());
|
||||
BindableList<Channel> availableChannels = (BindableList<Channel>)chatManager.AvailableChannels;
|
||||
availableChannels.Add(new Channel { Name = "#english" });
|
||||
availableChannels.Add(new Channel { Name = "#japanese" });
|
||||
|
@ -24,7 +24,6 @@ using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Online.Notifications.Polling;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Chat;
|
||||
using osu.Game.Overlays.Chat.Listing;
|
||||
@ -60,7 +59,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
CachedDependencies = new (Type, object)[]
|
||||
{
|
||||
(typeof(ChannelManager), channelManager = new ChannelManager(API, new PollingNotificationsClientConnector(API))),
|
||||
(typeof(ChannelManager), channelManager = new ChannelManager(API, API.GetNotificationsConnector())),
|
||||
},
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -16,7 +16,6 @@ using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Online.Notifications.Polling;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osuTK.Input;
|
||||
@ -251,7 +250,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
public TestContainer(IAPIProvider api, Channel[] channels)
|
||||
{
|
||||
this.channels = channels;
|
||||
ChannelManager = new ChannelManager(api, new PollingNotificationsClientConnector(api));
|
||||
ChannelManager = new ChannelManager(api, api.GetNotificationsConnector());
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -15,7 +15,6 @@ using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Notifications.Polling;
|
||||
using osu.Game.Overlays.Chat;
|
||||
using osuTK.Input;
|
||||
|
||||
@ -59,7 +58,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
var api = parent.Get<IAPIProvider>();
|
||||
|
||||
Add(channelManager = new ChannelManager(api, new PollingNotificationsClientConnector(api)));
|
||||
Add(channelManager = new ChannelManager(api, api.GetNotificationsConnector()));
|
||||
|
||||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
|
||||
|
Reference in New Issue
Block a user