diff --git a/Wabbajack.App.Wpf/View Models/ModeSelectionVM.cs b/Wabbajack.App.Wpf/View Models/ModeSelectionVM.cs index ac9b16fd..b17eb905 100644 --- a/Wabbajack.App.Wpf/View Models/ModeSelectionVM.cs +++ b/Wabbajack.App.Wpf/View Models/ModeSelectionVM.cs @@ -27,13 +27,6 @@ namespace Wabbajack public ModeSelectionVM(Client wjClient) { _wjClient = wjClient; - InstallCommand = ReactiveCommand.Create(() => - { - LoadLastLoadedModlist.Send(); - NavigateToGlobal.Send(NavigateToGlobal.ScreenType.Installer); - }); - CompileCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.Compiler)); - BrowseCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.ModListGallery)); VisitModlistWizardCommand = ReactiveCommand.Create(() => { ProcessStartInfo processStartInfo = new(Consts.WabbajackModlistWizardUri.ToString()) @@ -54,9 +47,6 @@ namespace Wabbajack } }); } - public ICommand BrowseCommand { get; } - public ICommand InstallCommand { get; } - public ICommand CompileCommand { get; } public ICommand VisitModlistWizardCommand { get; } public ReactiveCommand UpdateCommand { get; } diff --git a/Wabbajack.App.Wpf/View Models/NavigationVM.cs b/Wabbajack.App.Wpf/View Models/NavigationVM.cs index d5bad808..ec876634 100644 --- a/Wabbajack.App.Wpf/View Models/NavigationVM.cs +++ b/Wabbajack.App.Wpf/View Models/NavigationVM.cs @@ -22,7 +22,10 @@ namespace Wabbajack public class NavigationVM : ViewModel { private readonly ILogger _logger; - + public ICommand BrowseCommand { get; } + public ICommand InstallCommand { get; } + public ICommand CompileCommand { get; } + public ReactiveCommand UpdateCommand { get; } public NavigationVM(ILogger logger) { _logger = logger; @@ -34,9 +37,5 @@ namespace Wabbajack CompileCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.Compiler)); BrowseCommand = ReactiveCommand.Create(() => NavigateToGlobal.Send(NavigateToGlobal.ScreenType.ModListGallery)); } - public ICommand BrowseCommand { get; set; } - public ICommand InstallCommand { get; set; } - public ICommand CompileCommand { get; set; } - public ReactiveCommand UpdateCommand { get; } } } diff --git a/Wabbajack.App.Wpf/Views/NavigationView.xaml.cs b/Wabbajack.App.Wpf/Views/NavigationView.xaml.cs index 050924af..1c5e4a7e 100644 --- a/Wabbajack.App.Wpf/Views/NavigationView.xaml.cs +++ b/Wabbajack.App.Wpf/Views/NavigationView.xaml.cs @@ -5,6 +5,7 @@ using System.Reactive.Disposables; using System.Windows; using System.Windows.Controls; using Wabbajack.Common; +using Wabbajack.Messages; namespace Wabbajack { @@ -19,7 +20,7 @@ namespace Wabbajack this.WhenActivated(dispose => { this.WhenAny(x => x.ViewModel.BrowseCommand) - .BindTo(this, x => x.BrowseButton.Command) + .BindToStrict(this, x => x.BrowseButton.Command) .DisposeWith(dispose); /*