make privacy control screen optional
MODIFY
WalletWasabi.Fluent/UiConfig.cs
WalletWasabi.Fluent/UiConfig.cs
@@ -21,6 +21,7 @@ public class UiConfig : ConfigBase
private bool _runOnSystemStartup;
private bool _oobe;
private bool _hideOnClose;
+ private bool _alwaysShowPrivacyControl;
private bool _autoPaste;
private int _feeTarget;
@@ -44,6 +45,7 @@ public class UiConfig : ConfigBase
x => x.HideOnClose,
x => x.FeeTarget,
(_, _, _, _, _, _, _, _, _, _, _, _) => Unit.Default)
+ .Merge(this.WhenAnyValue(x => x.AlwaysShowPrivacyControl).Select(_ => Unit.Default))
.Throttle(TimeSpan.FromMilliseconds(500))
.Skip(1) // Won't save on UiConfig creation.
.ObserveOn(RxApp.TaskpoolScheduler)
@@ -145,4 +147,12 @@ public class UiConfig : ConfigBase
get => _hideOnClose;
set => RaiseAndSetIfChanged(ref _hideOnClose, value);
}
+
+ [DefaultValue(false)]
+ [JsonProperty(PropertyName = nameof(AlwaysShowPrivacyControl), DefaultValueHandling = DefaultValueHandling.Populate)]
+ public bool AlwaysShowPrivacyControl
+ {
+ get => _alwaysShowPrivacyControl;
+ set => RaiseAndSetIfChanged(ref _alwaysShowPrivacyControl, value);
+ }
}

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/PrivacySettingsTabViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/PrivacySettingsTabViewModel.cs
@@ -14,11 +14,13 @@ public partial class PrivacySettingsTabViewModel : SettingsTabViewModelBase
{
[AutoNotify] private int _minAnonScoreTarget;
[AutoNotify] private int _maxAnonScoreTarget;
+ [AutoNotify] private bool _alwaysShowPrivacyControl;
public PrivacySettingsTabViewModel()
{
_minAnonScoreTarget = Services.Config.MinAnonScoreTarget;
_maxAnonScoreTarget = Services.Config.MaxAnonScoreTarget;
+ _alwaysShowPrivacyControl = Services.UiConfig.AlwaysShowPrivacyControl;
this.WhenAnyValue(
x => x.MinAnonScoreTarget,
@@ -47,6 +49,9 @@ public partial class PrivacySettingsTabViewModel : SettingsTabViewModelBase
MinAnonScoreTarget = x - 1;
}
});
+
+ this.WhenAnyValue(x => x.AlwaysShowPrivacyControl)
+ .Subscribe(x => Services.UiConfig.AlwaysShowPrivacyControl = x);
}
protected override void EditConfigOnSave(Config config)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -212,7 +212,7 @@ public partial class TransactionPreviewViewModel : RoutableViewModel
if (!_info.Coins.Any())
{
var privacyControlDialogResult =
- await NavigateDialogAsync(new PrivacyControlViewModel(_wallet, _info, _transaction?.SpentCoins, isSilent: true));
+ await NavigateDialogAsync(new PrivacyControlViewModel(_wallet, _info, _transaction?.SpentCoins, isSilent: !Services.UiConfig.AlwaysShowPrivacyControl));
if (privacyControlDialogResult.Kind == DialogResultKind.Normal &&
privacyControlDialogResult.Result is { } coins)
{

MODIFY
WalletWasabi.Fluent/Views/Settings/PrivacySettingsTabView.axaml
WalletWasabi.Fluent/Views/Settings/PrivacySettingsTabView.axaml
x:CompileBindings="True">
<StackPanel Classes="settingsLayout">
+ <DockPanel>
+ <TextBlock Text="Always show Privacy Control screen" />
+ <ToggleSwitch IsChecked="{Binding AlwaysShowPrivacyControl}" />
+ </DockPanel>
+
<StackPanel Spacing="10">
<TextBlock Text="Minimum Anonymity Score Target" />
<DockPanel>

make privacy control screen optional