remove `Always show Privacy Contron screen` setting
MODIFY
WalletWasabi.Fluent/UiConfig.cs
WalletWasabi.Fluent/UiConfig.cs
@@ -21,7 +21,6 @@ public class UiConfig : ConfigBase
private bool _runOnSystemStartup;
private bool _oobe;
private bool _hideOnClose;
- private bool _alwaysShowPrivacyControl;
private bool _autoPaste;
private int _feeTarget;
@@ -45,7 +44,6 @@ 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)
@@ -147,12 +145,4 @@ 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/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -183,24 +183,17 @@ public partial class MainViewModel : ViewModelBase
return _settingsPage;
});
- PrivacySettingsTabViewModel.RegisterLazy(
- () =>
- {
- _settingsPage.SelectedTab = 1;
- return _settingsPage;
- });
-
NetworkSettingsTabViewModel.RegisterLazy(
() =>
{
- _settingsPage.SelectedTab = 2;
+ _settingsPage.SelectedTab = 1;
return _settingsPage;
});
BitcoinTabSettingsViewModel.RegisterLazy(
() =>
{
- _settingsPage.SelectedTab = 3;
+ _settingsPage.SelectedTab = 2;
return _settingsPage;
});

DELETE
WalletWasabi.Fluent/ViewModels/Settings/PrivacySettingsTabViewModel.cs
-using System.Reactive.Linq;
-using ReactiveUI;
-
-namespace WalletWasabi.Fluent.ViewModels.Settings;
-
-[NavigationMetaData(
- Title = "Privacy",
- Caption = "Manage privacy settings",
- Order = 1,
- Category = "Settings",
- Keywords = new[] { "Settings", "Privacy", "Minimal", "Medium", "Strong", "Anonymity", "Level" },
- IconName = "settings_privacy_regular")]
-public partial class PrivacySettingsTabViewModel : SettingsTabViewModelBase
-{
- [AutoNotify] private bool _alwaysShowPrivacyControl;
-
- public PrivacySettingsTabViewModel()
- {
- _alwaysShowPrivacyControl = Services.UiConfig.AlwaysShowPrivacyControl;
-
- this.WhenAnyValue(x => x.AlwaysShowPrivacyControl)
- .Subscribe(x => Services.UiConfig.AlwaysShowPrivacyControl = x);
- }
-
- protected override void EditConfigOnSave(Config config)
- {
- }
-}

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
@@ -12,7 +12,7 @@ namespace WalletWasabi.Fluent.ViewModels.Settings;
Caption = "Manage appearance, privacy and other settings",
Order = 1,
Category = "General",
- Keywords = new[] { "Settings", "General", "User", "Interface", "Privacy", "Advanced" },
+ Keywords = new[] { "Settings", "General", "User", "Interface", "Advanced" },
IconName = "settings_regular",
Searchable = false,
NavBarPosition = NavBarPosition.Bottom)]
@@ -26,7 +26,6 @@ public partial class SettingsPageViewModel : NavBarItemViewModel
_selectedTab = 0;
GeneralSettingsTab = new GeneralSettingsTabViewModel();
- PrivacySettingsTab = new PrivacySettingsTabViewModel();
NetworkSettingsTab = new NetworkSettingsTabViewModel();
BitcoinTabSettings = new BitcoinTabSettingsViewModel();
@@ -36,7 +35,6 @@ public partial class SettingsPageViewModel : NavBarItemViewModel
public ICommand RestartCommand { get; }
public GeneralSettingsTabViewModel GeneralSettingsTab { get; }
- public PrivacySettingsTabViewModel PrivacySettingsTab { get; }
public NetworkSettingsTabViewModel NetworkSettingsTab { get; }
public BitcoinTabSettingsViewModel BitcoinTabSettings { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacySuggestionsFlyoutViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacySuggestionsFlyoutViewModel.cs
@@ -39,7 +39,10 @@ public partial class PrivacySuggestionsFlyoutViewModel : ViewModelBase
Suggestions.Clear();
SelectedSuggestion = null;
- Suggestions.Add(new PocketSuggestionViewModel(SmartLabel.Merge(transaction.SpentCoins.Select(x => CoinHelpers.GetLabels(x, wallet.KeyManager.MinAnonScoreTarget)))));
+ if (!info.IsPrivate)
+ {
+ Suggestions.Add(new PocketSuggestionViewModel(SmartLabel.Merge(transaction.SpentCoins.Select(x => x.GetLabels(wallet.KeyManager.MinAnonScoreTarget)))));
+ }
var loadingRing = new LoadingSuggestionViewModel();
Suggestions.Add(loadingRing);

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

DELETE
WalletWasabi.Fluent/Views/Settings/PrivacySettingsTabView.axaml
-<UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:settings="using:WalletWasabi.Fluent.ViewModels.Settings"
- mc:Ignorable="d" d:DesignWidth="428" d:DesignHeight="371"
- x:Class="WalletWasabi.Fluent.Views.Settings.PrivacySettingsTabView"
- x:DataType="settings:PrivacySettingsTabViewModel"
- x:CompileBindings="True">
- <StackPanel Classes="settingsLayout">
-
- <DockPanel>
- <TextBlock Text="Always show Privacy Control screen" />
- <ToggleSwitch IsChecked="{Binding AlwaysShowPrivacyControl}" />
- </DockPanel>
-
- </StackPanel>
-</UserControl>

DELETE
WalletWasabi.Fluent/Views/Settings/PrivacySettingsTabView.axaml.cs
-using Avalonia.Controls;
-using Avalonia.Markup.Xaml;
-
-namespace WalletWasabi.Fluent.Views.Settings;
-
-public class PrivacySettingsTabView : UserControl
-{
- public PrivacySettingsTabView()
- {
- InitializeComponent();
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
-}

MODIFY
WalletWasabi.Fluent/Views/Settings/SettingsPageView.axaml
WalletWasabi.Fluent/Views/Settings/SettingsPageView.axaml
<v:GeneralSettingsTabView DataContext="{Binding GeneralSettingsTab}" />
</TabItem>
- <TabItem Header="Privacy">
- <v:PrivacySettingsTabView DataContext="{Binding PrivacySettingsTab}" />
- </TabItem>
-
<TabItem Header="Network">
<v:NetworkSettingsTabView DataContext="{Binding NetworkSettingsTab}" />
</TabItem>

remove `Always show Privacy Contron screen` setting