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()
|
||||
{
|
||||
rooms.CollectionChanged += roomsChanged;
|
||||
roomManager.RoomsUpdated += updateSorting;
|
||||
|
||||
rooms.CollectionChanged += roomsChanged;
|
||||
rooms.BindTo(roomManager.Rooms);
|
||||
|
||||
Filter?.BindValueChanged(criteria => applyFilterCriteria(criteria.NewValue), true);
|
||||
@ -108,14 +108,10 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
|
||||
private void addRooms(IEnumerable<Room> rooms)
|
||||
{
|
||||
LoadComponentsAsync(rooms.Select(room =>
|
||||
new DrawableLoungeRoom(room) { SelectedRoom = { BindTarget = SelectedRoom } }), rooms =>
|
||||
{
|
||||
// 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)));
|
||||
foreach (var room in rooms)
|
||||
roomFlow.Add(new DrawableLoungeRoom(room) { SelectedRoom = { BindTarget = SelectedRoom } });
|
||||
|
||||
applyFilterCriteria(Filter?.Value);
|
||||
});
|
||||
applyFilterCriteria(Filter?.Value);
|
||||
}
|
||||
|
||||
private void removeRooms(IEnumerable<Room> rooms)
|
||||
|
Loading…
Reference in New Issue
Block a user