Move Task to caller

This commit is contained in:
Théo Arrouye 2023-06-05 14:07:58 -07:00
parent 8051e3710b
commit bbe78d96bd

View file

@ -1363,7 +1363,7 @@ namespace Ryujinx.Ava.UI.ViewModels
if (prevUserId != AccountManager.LastOpenedUser.UserId) if (prevUserId != AccountManager.LastOpenedUser.UserId)
{ {
// current user changed, so refresh application metadata // current user changed, so refresh application metadata
RefreshApplicationsMetadata(); _ = Task.Run(() => RefreshApplicationsMetadata());
} }
} }
@ -1374,7 +1374,6 @@ namespace Ryujinx.Ava.UI.ViewModels
private async void RefreshApplicationsMetadata() private async void RefreshApplicationsMetadata()
{ {
await Task.Run(() => {
foreach (var app in _applications) foreach (var app in _applications)
{ {
var metadata = ApplicationLibrary.LoadAndSaveMetaData(AccountManager.LastOpenedUser.UserId.ToLibHacFsUid(), app.TitleId); var metadata = ApplicationLibrary.LoadAndSaveMetaData(AccountManager.LastOpenedUser.UserId.ToLibHacFsUid(), app.TitleId);
@ -1383,7 +1382,6 @@ namespace Ryujinx.Ava.UI.ViewModels
app.TimePlayedNum = metadata.TimePlayed; app.TimePlayedNum = metadata.TimePlayed;
app.TimePlayed = ApplicationLibrary.ConvertSecondsToFormattedString(metadata.TimePlayed); app.TimePlayed = ApplicationLibrary.ConvertSecondsToFormattedString(metadata.TimePlayed);
} }
});
RefreshView(); RefreshView();
} }