mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-27 17:46:23 +02:00
UI: Don't show total play time if there is none.
This commit is contained in:
parent
5d136980a3
commit
d3208a4c44
1 changed files with 8 additions and 4 deletions
|
@ -310,10 +310,15 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
private void TotalTimePlayed_Recalculated(Optional<TimeSpan> 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!;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue