File tree Expand file tree Collapse file tree
src/UniGetUI.Avalonia/Views/SoftwarePages Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using Avalonia ;
22using Avalonia . Controls ;
3+ using Avalonia . Threading ;
34using Avalonia . Controls . ApplicationLifetimes ;
45using Avalonia . Input ;
56using Avalonia . Input . Platform ;
@@ -86,7 +87,13 @@ or nameof(PackagesPageViewModel.SortAscending))
8687 // ─── UI-only: focus the package list ─────────────────────────────────────
8788 private void OnFocusListRequested ( ) => PackageList . Focus ( ) ;
8889
89- public void FocusPackageList ( ) => ViewModel . RequestFocusList ( ) ;
90+ public void FocusPackageList ( )
91+ {
92+ if ( ViewModel . MegaQueryBoxEnabled )
93+ Dispatcher . UIThread . Post ( ( ) => MegaQueryBlock . Focus ( ) , DispatcherPriority . Background ) ;
94+ else
95+ ViewModel . RequestFocusList ( ) ;
96+ }
9097 public void FilterPackages ( ) => ViewModel . FilterPackages ( ) ;
9198
9299 // ─── Abstract: let concrete pages add toolbar items ───────────────────────
You can’t perform that action at this time.
0 commit comments