From 4341d258af3d9ab94cf95cf20e02c921aa426894 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 13 Sep 2018 14:03:21 +0900 Subject: [PATCH] Make readonly instead --- osu.Game/Online/Chat/InfoMessage.cs | 2 +- osu.Game/Overlays/UserProfileOverlay.cs | 2 +- osu.Game/Users/User.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Online/Chat/InfoMessage.cs b/osu.Game/Online/Chat/InfoMessage.cs index 4e14b097f7..103a999591 100644 --- a/osu.Game/Online/Chat/InfoMessage.cs +++ b/osu.Game/Online/Chat/InfoMessage.cs @@ -15,7 +15,7 @@ namespace osu.Game.Online.Chat Timestamp = DateTimeOffset.Now; Content = message; - Sender = User.SystemUser; + Sender = User.SYSTEM_USER; } } } diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index f428e8cfc6..c106446fe0 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -77,7 +77,7 @@ namespace osu.Game.Overlays public void ShowUser(User user, bool fetchOnline = true) { - if (user == User.SystemUser) return; + if (user == User.SYSTEM_USER) return; Show(); diff --git a/osu.Game/Users/User.cs b/osu.Game/Users/User.cs index 3a90605da7..6c3d2bfa63 100644 --- a/osu.Game/Users/User.cs +++ b/osu.Game/Users/User.cs @@ -148,7 +148,7 @@ namespace osu.Game.Users /// /// A user instance for displaying locally created system messages. /// - public static User SystemUser { get; } = new User + public static readonly User SYSTEM_USER = new User { Username = "system", Id = 0