LWM and hidde amount when zero
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
<CheckBox Content = "Select All" IsThreeState="True" IsChecked = "{Binding SelectAllCheckBoxState}" Command="{Binding SelectAllCheckBoxCommand}" />
<CheckBox Content = "Select All Private" IsThreeState="True" IsChecked = "{Binding SelectPrivateCheckBoxState}" Command="{Binding SelectPrivateCheckBoxCommand}" ToolTip.Tip="Coins those acquired the strongest privacy shield." />
<CheckBox Content = "Select All Non-Private" IsThreeState="True" IsChecked = "{Binding SelectNonPrivateCheckBoxState}" Command="{Binding SelectNonPrivateCheckBoxCommand}" ToolTip.Tip="Coins those do not have the strongest privacy shield." />
+ <StackPanel Spacing="10" DockPanel.Dock="Bottom" Orientation="Horizontal" IsVisible="{Binding IsAnyCoinSelected}">
<TextBlock Text = "|" />
<TextBlock Text = "Selected Amount:" />
- <TextBlock Text = "{Binding TotalAmount}" />
+ <TextBlock Text = "{Binding TotalAmount, ConverterParameter=8, Converter={StaticResource LurkingWifeModeStringConverter}}" />
<TextBlock Text = "BTC" />
</StackPanel>
+ </StackPanel>
<ListBox Items="{Binding Coins}" VirtualizationMode="None" SelectedItem="{Binding Path=SelectedCoin, Mode=TwoWay}">
<ListBox.ContextMenu>
<ContextMenu>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
@@ -36,6 +36,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private GridLength _coinJoinStatusWidth;
private SortOrder _clustersSortDirection;
private decimal _totalAmount;
+ private bool _isAnyCoinSelected;
public ReactiveCommand<Unit, Unit> EnqueueCoin { get; }
public ReactiveCommand<Unit, Unit> DequeueCoin { get; }
@@ -113,6 +114,15 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
}
+ public bool IsAnyCoinSelected
+ {
+ get => _isAnyCoinSelected;
+ set
+ {
+ this.RaiseAndSetIfChanged(ref _isAnyCoinSelected, value);
+ }
+ }
+
private void RefreshOrdering()
{
if (AmountSortDirection != SortOrder.None)
@@ -285,6 +295,13 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
});
+ Global.UiConfig.WhenAnyValue(x => x.LurkingWifeMode)
+ .ObserveOn(RxApp.MainThreadScheduler)
+ .Subscribe(_ =>
+ {
+ this.RaisePropertyChanged(nameof(TotalAmount));
+ });
+
EnqueueCoin = ReactiveCommand.Create(() =>
{
if (SelectedCoin is null)
@@ -458,6 +475,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
SetSelections();
SelectionChanged?.Invoke(this, cvm);
TotalAmount = Coins.Where(x=>x.IsSelected).Sum(x=>x.Amount.ToDecimal(NBitcoin.MoneyUnit.BTC));
+ IsAnyCoinSelected = TotalAmount > 0m;
}
public void OnCoinStatusChanged()

MODIFY
WalletWasabi.Gui/Converters/LurkingWifeModeStringConverter.cs
WalletWasabi.Gui/Converters/LurkingWifeModeStringConverter.cs
@@ -21,7 +21,7 @@ namespace WalletWasabi.Gui.Converters
return new string(Enumerable.Repeat('#', len).ToArray());
}
- return value;
+ return value.ToString();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

LWM and hidde amount when zero