Compare commits

..

4 commits

4 changed files with 287 additions and 282 deletions

File diff suppressed because it is too large Load diff

View file

@ -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!;

View file

@ -64,6 +64,7 @@
MinWidth="200"
Height="6"
VerticalAlignment="Center"
Margin="0, 0, 5, 0"
Foreground="{DynamicResource SystemAccentColorLight2}"
IsVisible="{Binding StatusBarVisible}"
Maximum="{Binding StatusBarProgressMaximum}"

View file

@ -213,13 +213,13 @@ namespace Ryujinx.Ava.UI.Windows
}
}
public void Application_Opened(object sender, ApplicationOpenedEventArgs args)
public async void Application_Opened(object sender, ApplicationOpenedEventArgs args)
{
if (args.Application != null)
{
ViewModel.SelectedIcon = args.Application.Icon;
ViewModel.LoadApplication(args.Application).Wait();
await ViewModel.LoadApplication(args.Application);
}
args.Handled = true;