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:
parent
ff57562956
commit
116acc2b5e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user