Fix install location warning showing twice (#438)

This commit is contained in:
pizzaboxer 2023-07-25 16:19:03 +01:00
parent 38b1c584d2
commit 5cf51b3311
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -42,7 +42,7 @@ namespace Bloxstrap.UI.ViewModels.Menu
bool shouldCheckInstallLocation = App.IsFirstRun || App.BaseDirectory != _originalBaseDirectory; bool shouldCheckInstallLocation = App.IsFirstRun || App.BaseDirectory != _originalBaseDirectory;
if (shouldCheckInstallLocation) if (shouldCheckInstallLocation && NavigationVisibility == Visibility.Visible)
{ {
try try
{ {
@ -96,14 +96,15 @@ namespace Bloxstrap.UI.ViewModels.Menu
((INavigationWindow)_window).Navigate(typeof(PreInstallPage)); ((INavigationWindow)_window).Navigate(typeof(PreInstallPage));
NavigationVisibility = Visibility.Collapsed; NavigationVisibility = Visibility.Collapsed;
ConfirmButtonEnabled = false;
OnPropertyChanged(nameof(NavigationVisibility)); OnPropertyChanged(nameof(NavigationVisibility));
ConfirmButtonEnabled = false;
OnPropertyChanged(nameof(ConfirmButtonEnabled)); OnPropertyChanged(nameof(ConfirmButtonEnabled));
Task.Run(async delegate Task.Run(async delegate
{ {
await Task.Delay(3000); await Task.Delay(3000);
ConfirmButtonEnabled = true; ConfirmButtonEnabled = true;
OnPropertyChanged(nameof(ConfirmButtonEnabled)); OnPropertyChanged(nameof(ConfirmButtonEnabled));
}); });