diff --git a/osu.Game.Tests/Visual/Background/TestCaseBackgroundScreenBeatmap.cs b/osu.Game.Tests/Visual/Background/TestCaseBackgroundScreenBeatmap.cs index e9208d8f5b..81fab5b4b3 100644 --- a/osu.Game.Tests/Visual/Background/TestCaseBackgroundScreenBeatmap.cs +++ b/osu.Game.Tests/Visual/Background/TestCaseBackgroundScreenBeatmap.cs @@ -275,7 +275,6 @@ private void setupUserSettings() private class DummySongSelect : PlaySongSelect { - protected override BackgroundScreen CreateBackground() { FadeAccessibleBackground background = new FadeAccessibleBackground(Beatmap.Value); @@ -319,7 +318,6 @@ private void load(OsuConfigManager config) private class FadeAccessibleResults : SoloResults { - public FadeAccessibleResults(ScoreInfo score) : base(score) { @@ -332,7 +330,6 @@ public FadeAccessibleResults(ScoreInfo score) private class TestPlayer : Player { - protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground(Beatmap.Value); protected override UserDimContainer CreateStoryboardContainer() diff --git a/osu.Game.Tests/Visual/Gameplay/TestCasePause.cs b/osu.Game.Tests/Visual/Gameplay/TestCasePause.cs index dec4830188..a52e84ed62 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestCasePause.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestCasePause.cs @@ -12,7 +12,6 @@ using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Scoring; using osu.Game.Screens.Play; -using osu.Game.Users; using osuTK; using osuTK.Input; diff --git a/osu.Game.Tests/Visual/Online/TestCaseUserPanel.cs b/osu.Game.Tests/Visual/Online/TestCaseUserPanel.cs index 3929fe6c50..0e958f45c6 100644 --- a/osu.Game.Tests/Visual/Online/TestCaseUserPanel.cs +++ b/osu.Game.Tests/Visual/Online/TestCaseUserPanel.cs @@ -12,8 +12,8 @@ namespace osu.Game.Tests.Visual.Online [TestFixture] public class TestCaseUserPanel : OsuTestCase { - UserPanel flyte; - UserPanel peppy; + private readonly UserPanel flyte; + private readonly UserPanel peppy; public TestCaseUserPanel() { diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index 170f548676..8a6049b6fd 100644 --- a/osu.Game/Screens/OsuScreen.cs +++ b/osu.Game/Screens/OsuScreen.cs @@ -64,15 +64,15 @@ public abstract class OsuScreen : Screen, IOsuScreen, IKeyBindingHandler protected UserActivity ScreenActivity { + get => activity; set { - if (value == null) return; + if (value == activity) return; if (api == null) return; activity = value; api.LocalUser.Value.Activity.Value = activity; } - get => activity; } private UserActivity activity; diff --git a/osu.Game/Users/UserActivity.cs b/osu.Game/Users/UserActivity.cs index 1e69cc3e8e..fb896413e5 100644 --- a/osu.Game/Users/UserActivity.cs +++ b/osu.Game/Users/UserActivity.cs @@ -65,6 +65,4 @@ public class UserActivityInLobby : UserActivity { public override string Status => @"in Multiplayer Lobby"; } - - } diff --git a/osu.Game/Users/UserPanel.cs b/osu.Game/Users/UserPanel.cs index 410ade33fb..1f31ead1e7 100644 --- a/osu.Game/Users/UserPanel.cs +++ b/osu.Game/Users/UserPanel.cs @@ -238,10 +238,10 @@ private void displayStatus(UserStatus status, UserActivity activity = null) statusBg.FadeColour(activity.GetAppropriateColour(colours), 500, Easing.OutQuint); return; } - - statusMessage.Text = status.Message; - statusBg.FadeColour(status?.GetAppropriateColour(colours) ?? colours.Gray5, 500, Easing.OutQuint); } + + statusMessage.Text = status?.Message; + statusBg.FadeColour(status?.GetAppropriateColour(colours) ?? colours.Gray5, 500, Easing.OutQuint); } public MenuItem[] ContextMenuItems => new MenuItem[]