Improve LibrarySizeChanged performance

This commit is contained in:
Michael Bucari-Tovo 2025-02-27 22:56:02 -07:00
parent 5f5c9f65ed
commit 47c9fcb883
3 changed files with 9 additions and 8 deletions

View file

@ -4,6 +4,7 @@ using LibationAvalonia.Views;
using LibationFileManager;
using ReactiveUI;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace LibationAvalonia.ViewModels
{
@ -38,7 +39,9 @@ namespace LibationAvalonia.ViewModels
private async void LibraryCommands_LibrarySizeChanged(object sender, List<LibraryBook> fullLibrary)
{
await ProductsDisplay.UpdateGridAsync(fullLibrary);
await Task.WhenAll(
SetBackupCountsAsync(fullLibrary),
ProductsDisplay.UpdateGridAsync(fullLibrary));
}
private static string menufyText(string header) => Configuration.IsMacOs ? header : $"_{header}";