Skip to content

Commit

Permalink
reorder calls
Browse files Browse the repository at this point in the history
  • Loading branch information
aspriddell committed May 17, 2023
1 parent d4404ba commit c9ed764
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DragonFruit.Kaplan/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public MainWindowViewModel()
.ObserveOn(RxApp.MainThreadScheduler)
.Select(x => x.Any());

_packageRefreshListener = MessageBus.Current.Listen<UninstallEventArgs>().Subscribe(x => RefreshPackagesImpl());
_displayedPackages = this.WhenAnyValue(x => x.DiscoveredPackages, x => x.SearchQuery, x => x.SelectedPackages)
.ObserveOn(RxApp.TaskpoolScheduler)
.Select(q =>
Expand All @@ -55,8 +56,6 @@ public MainWindowViewModel()
})
.ToProperty(this, x => x.DisplayedPackages);

_packageRefreshListener = MessageBus.Current.Listen<UninstallEventArgs>().Subscribe(x => RefreshPackagesImpl());

// create commands
RefreshPackages = ReactiveCommand.Create(RefreshPackagesImpl);
ClearSelection = ReactiveCommand.Create(() => SelectedPackages.Clear(), packagesSelected);
Expand Down

0 comments on commit c9ed764

Please sign in to comment.