mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Revert "Load DrawableLoungRoom
s asynchronously"
This reverts commit 0b55bb6913fbf05ebb8ecadfe711084d6797efe0.
This commit is contained in:
parent
7ed995fbc5
commit
7941240a00
@ -64,9 +64,9 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
|
rooms.CollectionChanged += roomsChanged;
|
||||||
roomManager.RoomsUpdated += updateSorting;
|
roomManager.RoomsUpdated += updateSorting;
|
||||||
|
|
||||||
rooms.CollectionChanged += roomsChanged;
|
|
||||||
rooms.BindTo(roomManager.Rooms);
|
rooms.BindTo(roomManager.Rooms);
|
||||||
|
|
||||||
Filter?.BindValueChanged(criteria => applyFilterCriteria(criteria.NewValue), true);
|
Filter?.BindValueChanged(criteria => applyFilterCriteria(criteria.NewValue), true);
|
||||||
@ -108,14 +108,10 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
|
|
||||||
private void addRooms(IEnumerable<Room> rooms)
|
private void addRooms(IEnumerable<Room> rooms)
|
||||||
{
|
{
|
||||||
LoadComponentsAsync(rooms.Select(room =>
|
foreach (var room in rooms)
|
||||||
new DrawableLoungeRoom(room) { SelectedRoom = { BindTarget = SelectedRoom } }), rooms =>
|
roomFlow.Add(new DrawableLoungeRoom(room) { SelectedRoom = { BindTarget = SelectedRoom } });
|
||||||
{
|
|
||||||
// check against rooms collection to ensure the room wasn't removed since this async load started.
|
|
||||||
roomFlow.AddRange(rooms.Where(r => this.rooms.Contains(r.Room)));
|
|
||||||
|
|
||||||
applyFilterCriteria(Filter?.Value);
|
applyFilterCriteria(Filter?.Value);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeRooms(IEnumerable<Room> rooms)
|
private void removeRooms(IEnumerable<Room> rooms)
|
||||||
|
Loading…
Reference in New Issue
Block a user