Hide back button and settings button during install (#2368)

* hide back button and settings button during install phase, so that user does not press back or settings( and then back to main screen again ) while a download thread still runs in th ebackground

* updated changelog

---------

Co-authored-by: Timothy Baldridge <tbaldridge@gmail.com>
This commit is contained in:
JanuarySnow 2023-07-16 22:24:02 +01:00 committed by GitHub
parent 79cd780430
commit 005466e53b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View File

@ -3,6 +3,7 @@
#### Version TBD
* Fixed issues related to high RAM usage
* The resumable downloads now reserve drive space to write to in advance instead of being managed in system RAM
* Fixed allowing back button during install which can result in multiple install processes
* fixed search filter not applying when pressing back button and reaccessing gallery
* Added more robust checking for protected location paths and subfolders for the launcher exe and install and download paths
* Fixed readme double opening when modlist details are prepoulated

View File

@ -39,6 +39,11 @@ namespace Wabbajack
.BindToStrict(this, view => view.BackButton.Command)
.DisposeWith(disposables);
ViewModel.WhenAnyValue(vm => vm.InstallState)
.Select(v => v == InstallState.Installing ? Visibility.Collapsed : Visibility.Visible)
.BindToStrict(this, view => view.BackButton.Visibility)
.DisposeWith(disposables);
ViewModel.WhenAnyValue(vm => vm.OpenReadmeCommand)
.BindToStrict(this, view => view.OpenReadmePreInstallButton.Command)
.DisposeWith(disposables);

View File

@ -118,7 +118,12 @@ namespace Wabbajack
((MainWindowVM) DataContext).WhenAnyValue(vm => vm.OpenSettingsCommand)
.BindTo(this, view => view.SettingsButton.Command);
((MainWindowVM)DataContext).WhenAnyValue(vm => vm.Installer.InstallState)
.ObserveOn(RxApp.MainThreadScheduler)
.Select(v => v == InstallState.Installing ? Visibility.Collapsed : Visibility.Visible)
.BindTo(this, view => view.SettingsButton.Visibility);
}
catch (Exception ex)
{