1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 11:02:54 +08:00

Expose Fetch method

This commit is contained in:
Andrei Zavatski 2020-03-21 20:37:21 +03:00
parent d241f7c55f
commit 2b0c267cb9
2 changed files with 4 additions and 6 deletions

View File

@ -10,7 +10,6 @@ using osu.Game.Users;
using osu.Game.Overlays;
using osu.Framework.Allocation;
using NUnit.Framework;
using osu.Game.Online.API;
namespace osu.Game.Tests.Visual.Online
{
@ -28,9 +27,6 @@ namespace osu.Game.Tests.Visual.Online
[Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
[Resolved]
private IAPIProvider api { get; set; }
private FriendsLayout layout;
[SetUp]
@ -52,6 +48,7 @@ namespace osu.Game.Tests.Visual.Online
[Test]
public void TestOnline()
{
AddStep("Fetch online", () => layout?.Fetch());
}
private List<User> getUsers() => new List<User>

View File

@ -25,8 +25,6 @@ namespace osu.Game.Overlays.Dashboard.Friends
get => users;
set
{
request?.Cancel();
users = value;
onlineStatusControl.Populate(value);
@ -152,7 +150,10 @@ namespace osu.Game.Overlays.Dashboard.Friends
onlineStatusControl.Current.BindValueChanged(_ => recreatePanels());
userListToolbar.DisplayStyle.BindValueChanged(_ => recreatePanels());
userListToolbar.SortCriteria.BindValueChanged(_ => recreatePanels());
}
public void Fetch()
{
if (!api.IsLoggedIn)
return;