From d3208a4c44c6fa9e47f21965c6f5173d6f3c5b21 Mon Sep 17 00:00:00 2001 From: GreemDev Date: Fri, 20 Jun 2025 23:02:39 -0500 Subject: [PATCH] UI: Don't show total play time if there is none. --- src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index 5e7df4d62..4ca21e788 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -310,10 +310,15 @@ namespace Ryujinx.Ava.UI.ViewModels private void TotalTimePlayed_Recalculated(Optional ts) { - ShowTotalTimePlayed = ts.HasValue; - if (ts.HasValue) - LocaleManager.Instance.SetDynamicValues(LocaleKeys.GameListLabelTotalTimePlayed, ValueFormatUtils.FormatTimeSpan(ts.Value)); + { + var formattedPlayTime = ValueFormatUtils.FormatTimeSpan(ts.Value); + LocaleManager.Instance.SetDynamicValues(LocaleKeys.GameListLabelTotalTimePlayed, formattedPlayTime); + ShowTotalTimePlayed = formattedPlayTime != string.Empty; + return; + } + + ShowTotalTimePlayed = ts.HasValue; } public bool ShowTotalTimePlayed @@ -334,7 +339,6 @@ namespace Ryujinx.Ava.UI.ViewModels _listSelectedApplication = value; if (_listSelectedApplication != null && ListAppContextMenu == null) - ListAppContextMenu = new ApplicationContextMenu(); else if (_listSelectedApplication == null && ListAppContextMenu != null) ListAppContextMenu = null!;