1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 20:23:00 +08:00

feat: actually support status also for Replays

This commit is contained in:
tsrk 2023-02-06 00:41:10 +00:00
parent d5b2d9ce97
commit bf273597ea
No known key found for this signature in database
GPG Key ID: EBD46BB3049B56D6
3 changed files with 12 additions and 9 deletions

View File

@ -15,6 +15,7 @@ using osu.Game.Rulesets.Mods;
using osu.Game.Scoring;
using osu.Game.Screens.Play.HUD;
using osu.Game.Screens.Ranking;
using osu.Game.Users;
namespace osu.Game.Screens.Play
{
@ -24,6 +25,8 @@ namespace osu.Game.Screens.Play
private readonly bool replayIsFailedScore;
protected override UserActivity InitialActivity => new UserActivity.Watching();
// Disallow replays from failing. (see https://github.com/ppy/osu/issues/6108)
protected override bool CheckModsAllowFailure()
{

View File

@ -15,7 +15,7 @@ namespace osu.Game.Screens.Play
{
private readonly Score score;
protected override UserActivity InitialActivity => new UserActivity.Spectating(score.ScoreInfo.User);
protected override UserActivity InitialActivity => new UserActivity.Spectating();
public SoloSpectatorPlayer(Score score, PlayerConfiguration configuration = null)
: base(score, configuration)

View File

@ -5,7 +5,6 @@
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets;
using osuTK.Graphics;
@ -91,16 +90,17 @@ namespace osu.Game.Users
public override string Status => @"Editing a beatmap";
}
public class Spectating : UserActivity
public class Watching : UserActivity
{
private readonly APIUser user;
protected virtual string Verb => @"Watching";
public Spectating(APIUser user)
{
this.user = user;
}
public override string Status => @$"{Verb} a game";
}
public override string Status => @$"Spectating {user.Username}";
public class Spectating : Watching
{
protected override string Verb => @"Spectating";
public override string Status => @$"{Verb} a game";
}
public class SearchingForLobby : UserActivity