1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 02:22:56 +08:00

Use AddOnce everywhere to reduce potential call count

This commit is contained in:
Dean Herbert 2021-02-11 16:00:35 +09:00
parent 549e7520c5
commit 889a99c49c

View File

@ -78,7 +78,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
managerUpdated = beatmapManager.ItemUpdated.GetBoundCopy(); managerUpdated = beatmapManager.ItemUpdated.GetBoundCopy();
managerUpdated.BindValueChanged(beatmapUpdated); managerUpdated.BindValueChanged(beatmapUpdated);
UserMods.BindValueChanged(_ => UpdateMods()); UserMods.BindValueChanged(_ => Scheduler.AddOnce(UpdateMods));
} }
public override void OnEntering(IScreen last) public override void OnEntering(IScreen last)
@ -97,7 +97,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
{ {
base.OnResuming(last); base.OnResuming(last);
beginHandlingTrack(); beginHandlingTrack();
UpdateMods(); Scheduler.AddOnce(UpdateMods);
} }
public override bool OnExiting(IScreen next) public override bool OnExiting(IScreen next)