1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00

Add flow for marking user as quit for further handling

This commit is contained in:
Dean Herbert 2020-12-26 11:35:51 +09:00
parent ff57562956
commit 116acc2b5e

View File

@ -93,6 +93,9 @@ namespace osu.Game.Screens.Play.HUD
foreach (var userId in e.OldItems.OfType<int>())
{
streamingClient.StopWatchingUser(userId);
if (userScores.TryGetValue(userId, out var trackedData))
trackedData.MarkUserQuit();
}
break;
@ -143,11 +146,19 @@ namespace osu.Game.Screens.Play.HUD
private readonly BindableInt currentCombo = new BindableInt();
public IBindable<bool> UserQuit => userQuit;
private readonly BindableBool userQuit = new BindableBool();
[CanBeNull]
public FrameHeader LastHeader;
public void MarkUserQuit() => userQuit.Value = true;
public void UpdateScore(ScoreProcessor processor, ScoringMode mode)
{
Debug.Assert(UserQuit.Value);
if (LastHeader == null)
return;