0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-12 16:50:43 -05:00

hide wipe checkbox when wipe pending

This commit is contained in:
IsWaffle 2023-09-12 17:30:44 -04:00
parent 0b65346512
commit 0e8773c2b5
2 changed files with 11 additions and 1 deletions

View File

@ -41,6 +41,13 @@ namespace Aki.Launcher.ViewModels
set => this.RaiseAndSetIfChanged(ref _WipeProfileOnStart, value);
}
private bool _ProfileWipePending;
public bool ProfileWipePending
{
get => _ProfileWipePending;
set => this.RaiseAndSetIfChanged(ref _ProfileWipePending, value);
}
public string CurrentID { get; set; }
public ProfileInfo ProfileInfo { get; set; } = AccountManager.SelectedProfileInfo;
@ -199,6 +206,7 @@ namespace Aki.Launcher.ViewModels
{
case AccountStatus.OK:
{
ProfileWipePending = true;
CurrentEdition = AccountManager.SelectedAccount.edition;
SendNotification("", LocalizationProvider.Instance.account_updated);
break;
@ -312,6 +320,7 @@ namespace Aki.Launcher.ViewModels
case LauncherAction.MinimizeAction:
{
ChangeWindowState(Avalonia.Controls.WindowState.Normal);
ProfileWipePending = false;
break;
}

View File

@ -68,7 +68,8 @@
<CheckBox Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=wipe_on_start}"
Grid.Row="4" Grid.Column="1"
IsChecked="{Binding WipeProfileOnStart}"
IsEnabled="Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning"
IsEnabled="{Binding Source={x:Static helpers:LauncherSettingsProvider.Instance}, Path=!GameRunning}"
IsVisible="{Binding !ProfileWipePending}"
/>
</Grid>
</Border>