From 86fc519b5b8d894fd129551519f8995b541fb3d8 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 14 Feb 2024 13:48:53 +0900 Subject: [PATCH 1/2] Remove seemingly unnecessary cast --- osu.Game/Users/UserRankPanel.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Users/UserRankPanel.cs b/osu.Game/Users/UserRankPanel.cs index 52cb50a898..311219e44c 100644 --- a/osu.Game/Users/UserRankPanel.cs +++ b/osu.Game/Users/UserRankPanel.cs @@ -7,7 +7,6 @@ using osu.Framework.Extensions.LocalisationExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Input.Events; -using osu.Framework.Localisation; using osu.Game.Online.API; using osu.Game.Online.API.Requests.Responses; using osu.Game.Overlays.Profile.Header.Components; @@ -51,7 +50,7 @@ namespace osu.Game.Users { globalRankDisplay.Content = stats.NewValue?.GlobalRank?.ToLocalisableString("\\##,##0") ?? "-"; countryRankDisplay.Content = stats.NewValue?.CountryRank?.ToLocalisableString("\\##,##0") ?? "-"; - ppDisplay.Content = stats.NewValue?.PP?.ToLocalisableString("#,##0") ?? (LocalisableString)"0"; + ppDisplay.Content = stats.NewValue?.PP?.ToLocalisableString("#,##0") ?? "0"; }, true); } From 57de4bcf5325bdc06d04f574064a6f04398ba8c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Wed, 14 Feb 2024 13:49:41 +0100 Subject: [PATCH 2/2] Rename argument --- osu.Game/Overlays/Profile/Header/Components/TotalPlayTime.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Profile/Header/Components/TotalPlayTime.cs b/osu.Game/Overlays/Profile/Header/Components/TotalPlayTime.cs index 742464809c..5add988339 100644 --- a/osu.Game/Overlays/Profile/Header/Components/TotalPlayTime.cs +++ b/osu.Game/Overlays/Profile/Header/Components/TotalPlayTime.cs @@ -38,9 +38,9 @@ namespace osu.Game.Overlays.Profile.Header.Components UserStatistics.BindValueChanged(updateTime, true); } - private void updateTime(ValueChangedEvent user) + private void updateTime(ValueChangedEvent statistics) { - int? playTime = user.NewValue?.PlayTime; + int? playTime = statistics.NewValue?.PlayTime; TooltipText = (playTime ?? 0) / 3600 + " hours"; info.Content = formatTime(playTime); }