From c9ed764925066e27d8ba79ca84801f249fc8eb6a Mon Sep 17 00:00:00 2001 From: Albie Date: Wed, 17 May 2023 14:21:32 +0100 Subject: [PATCH] reorder calls --- DragonFruit.Kaplan/ViewModels/MainWindowViewModel.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DragonFruit.Kaplan/ViewModels/MainWindowViewModel.cs b/DragonFruit.Kaplan/ViewModels/MainWindowViewModel.cs index cfa35ca..b066a91 100644 --- a/DragonFruit.Kaplan/ViewModels/MainWindowViewModel.cs +++ b/DragonFruit.Kaplan/ViewModels/MainWindowViewModel.cs @@ -45,6 +45,7 @@ public MainWindowViewModel() .ObserveOn(RxApp.MainThreadScheduler) .Select(x => x.Any()); + _packageRefreshListener = MessageBus.Current.Listen().Subscribe(x => RefreshPackagesImpl()); _displayedPackages = this.WhenAnyValue(x => x.DiscoveredPackages, x => x.SearchQuery, x => x.SelectedPackages) .ObserveOn(RxApp.TaskpoolScheduler) .Select(q => @@ -55,8 +56,6 @@ public MainWindowViewModel() }) .ToProperty(this, x => x.DisplayedPackages); - _packageRefreshListener = MessageBus.Current.Listen().Subscribe(x => RefreshPackagesImpl()); - // create commands RefreshPackages = ReactiveCommand.Create(RefreshPackagesImpl); ClearSelection = ReactiveCommand.Create(() => SelectedPackages.Clear(), packagesSelected);