1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 16:27:26 +08:00

remove unnecessary Schedules

one was bugging out when rapidly switching display styles and the other was... unnecessary
This commit is contained in:
Aergwyn 2018-01-09 19:03:23 +01:00
parent 44d821172a
commit 4ce125478a

View File

@ -143,8 +143,7 @@ namespace osu.Game.Overlays
if(panels != null) if(panels != null)
ScrollFlow.Remove(panels); ScrollFlow.Remove(panels);
// delay new panels so they don't get added before the old ones are gone ScrollFlow.Add(panels = newPanels);
Scheduler.AddDelayed(() => ScrollFlow.Add(panels = newPanels), 200);
}); });
} }
@ -197,12 +196,9 @@ namespace osu.Game.Overlays
private void updateUsers(IEnumerable<User> newUsers) private void updateUsers(IEnumerable<User> newUsers)
{ {
Schedule(() => Users = newUsers;
{ loading.Hide();
Users = newUsers; recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
loading.Hide();
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
});
} }
public void APIStateChanged(APIAccess api, APIState state) public void APIStateChanged(APIAccess api, APIState state)