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

Recreate panels only while loading/loaded

This commit is contained in:
smoogipoo 2019-12-19 02:21:33 +09:00
parent 007e2e80c1
commit dd68106d90

View File

@ -17,6 +17,7 @@ using osu.Game.Overlays.SearchableList;
using osu.Game.Overlays.Social;
using osu.Game.Users;
using System.Threading;
using osu.Framework.Allocation;
using osu.Framework.Threading;
namespace osu.Game.Overlays
@ -44,7 +45,9 @@ namespace osu.Game.Overlays
return;
users = value ?? Array.Empty<User>();
recreatePanels();
if (LoadState >= LoadState.Ready)
recreatePanels();
}
}
@ -70,7 +73,6 @@ namespace osu.Game.Overlays
};
Header.Tabs.Current.ValueChanged += _ => queueUpdate();
Filter.Tabs.Current.ValueChanged += _ => onFilterUpdate();
Filter.DisplayStyleControl.DisplayStyle.ValueChanged += _ => recreatePanels();
@ -88,6 +90,12 @@ namespace osu.Game.Overlays
};
}
[BackgroundDependencyLoader]
private void load()
{
recreatePanels();
}
private APIRequest getUsersRequest;
private readonly Bindable<string> currentQuery = new Bindable<string>();