some what functional manual boost
MODIFY
WalletWasabi.Fluent/Controls/TileControl.axaml.cs
WalletWasabi.Fluent/Controls/TileControl.axaml.cs
@@ -10,22 +10,22 @@ namespace WalletWasabi.Fluent.Controls
{
private ContentPresenter? _contentPresenter;
- public static readonly StyledProperty<object> LargeSizeContentProperty =
- AvaloniaProperty.Register<TileControl, object>(nameof(LargeSizeContent));
+ public static readonly StyledProperty<object?> LargeSizeContentProperty =
+ AvaloniaProperty.Register<TileControl, object?>(nameof(LargeSizeContent));
- public static readonly StyledProperty<object> WideSizeContentProperty =
- AvaloniaProperty.Register<TileControl, object>(nameof(WideSizeContent));
+ public static readonly StyledProperty<object?> WideSizeContentProperty =
+ AvaloniaProperty.Register<TileControl, object?>(nameof(WideSizeContent));
public static readonly StyledProperty<TileSize> TileSizeProperty =
AvaloniaProperty.Register<TileControl, TileSize>(nameof(TileSize));
- public object LargeSizeContent
+ public object? LargeSizeContent
{
get => GetValue(LargeSizeContentProperty);
set => SetValue(LargeSizeContentProperty, value);
}
- public object WideSizeContent
+ public object? WideSizeContent
{
get => GetValue(WideSizeContentProperty);
set => SetValue(WideSizeContentProperty, value);
@@ -41,20 +41,26 @@ namespace WalletWasabi.Fluent.Controls
{
if (_contentPresenter is { })
{
+ object? content = null;
+
switch (TileSize)
{
- case TileSize.Medium:
- _contentPresenter.Content = Content;
- break;
-
case TileSize.Large:
- _contentPresenter.Content = LargeSizeContent;
+ if (LargeSizeContent is { })
+ {
+ content = LargeSizeContent;
+ }
break;
case TileSize.Wide:
- _contentPresenter.Content = WideSizeContent;
+ if (WideSizeContent is { })
+ {
+ content = WideSizeContent;
+ }
break;
}
+
+ _contentPresenter.Content = content ?? Content;
}
}

MODIFY
WalletWasabi.Fluent/Helpers/TileHelper.cs
WalletWasabi.Fluent/Helpers/TileHelper.cs
@@ -36,7 +36,7 @@ namespace WalletWasabi.Fluent.Helpers
TilePresetIndex = walletViewModel.LayoutIndex
},
- new WalletPieChartTileViewModel(walletViewModel, balanceChanged)
+ new PrivacyControlTileViewModel(walletViewModel.Wallet, balanceChanged)
{
TilePresets = new ObservableCollection<TilePresetViewModel>()
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/WalletPieChartTileViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/WalletPieChartTileViewModel.cs
@@ -6,6 +6,7 @@ using System.Reactive.Disposables;
using System.Windows.Input;
using NBitcoin;
using ReactiveUI;
+using WalletWasabi.Fluent.Controls;
using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
@@ -49,17 +50,9 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
this.WhenAnyValue(x => x.IsAutoCoinJoinEnabled)
.Subscribe(x => walletVm.Settings.AutoCoinJoin = x);
-
-
- BoostPrivacyCommand = ReactiveCommand.Create(() =>
- {
- _wallet.AllowManualCoinJoin = true;
- IsBoosting = true;
- });
-
}
- public ICommand BoostPrivacyCommand { get; }
+
protected override void OnActivated(CompositeDisposable disposables)
{
@@ -68,6 +61,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
_balanceChanged
.Subscribe(_ => Update())
.DisposeWith(disposables);
+
+ Update();
}
private void Update()

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
@@ -29,7 +29,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
private readonly int _smallLayoutIndex;
private readonly int _normalLayoutIndex;
private readonly int _wideLayoutIndex;
- [AutoNotify] private IList<TileViewModel>? _tiles;
+ [AutoNotify] private IList<TileViewModel> _tiles;
[AutoNotify] private IList<TileLayoutViewModel>? _layouts;
[AutoNotify] private int _layoutIndex;
[AutoNotify] private double _widthSource;

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChart/WalletPieChartLargeTileView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/WalletPieChart/WalletPieChartLargeTileView.axaml
<Grid Margin="20 10 20 20" RowDefinitions="*,Auto">
<Panel Margin="8" VerticalAlignment="Center" HorizontalAlignment="Center">
<controls:RingChartControl DataPoints="{Binding TestDataPoints}" />
- <Button Content="Boost Privacy" HorizontalAlignment="Center" VerticalAlignment="Center" Classes="hyperlink" Command="{Binding BoostPrivacyCommand}" />
+ <Button Content="Boost Privacy" HorizontalAlignment="Center" VerticalAlignment="Center" Classes="hyperlink" />
</Panel>
<StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Spacing="5">
<TextBlock Classes="h6" FontWeight="Bold" TextAlignment="Center" Text="Warning!" />

some what functional manual boost