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:
parent
d241f7c55f
commit
2b0c267cb9
@ -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>
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user