Added delayed search update timer to XCI File Trimmer dialog and Games Compatibility window to stop phantom duplicate keystrokes from occurring.

This commit is contained in:
Aaron Murgatroyd 2025-05-19 21:01:59 +10:00
parent 1544f54603
commit 4d16b2b4e4
4 changed files with 33 additions and 17 deletions

View file

@ -44,6 +44,7 @@ namespace Ryujinx.Ava.UI.ViewModels
private MainWindowViewModel _mainWindowViewModel;
private CancellationTokenSource _cancellationTokenSource;
private string _search;
private Timer _searchTimer;
private ProcessingMode _processingMode;
private SortField _sortField = SortField.Name;
private bool _sortAscending = true;
@ -478,7 +479,13 @@ namespace Ryujinx.Ava.UI.ViewModels
set
{
_search = value;
FilteringChanged();
_searchTimer?.Dispose();
_searchTimer = new Timer(_ =>
{
FilteringChanged();
_searchTimer.Dispose();
_searchTimer = null;
}, null, 250, 0);
}
}