don't use oaph for `IsMusicBoxVisible`
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
@@ -24,8 +24,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets;
public partial class WalletViewModel : WalletViewModelBase
{
- private readonly ObservableAsPropertyHelper<bool> _isMusicBoxVisible;
-
private readonly double _smallLayoutHeightBreakpoint;
private readonly double _wideLayoutWidthBreakpoint;
private readonly int _smallLayoutIndex;
@@ -127,14 +125,13 @@ public partial class WalletViewModel : WalletViewModelBase
this.WhenAnyValue(x => x.IsWalletBalanceZero)
.Subscribe(_ => IsSendButtonVisible = !IsWalletBalanceZero && (!wallet.KeyManager.IsWatchOnly || wallet.KeyManager.IsHardwareWallet));
- _isMusicBoxVisible =
+ IsMusicBoxVisible =
this.WhenAnyValue(x => x.IsSelected, x => x.IsWalletBalanceZero)
.Select(tuple =>
{
var (isSelected, isWalletBalanceZero) = tuple;
return isSelected && !isWalletBalanceZero && !wallet.KeyManager.IsWatchOnly;
- })
- .ToProperty(this, x => x.IsMusicBoxVisible);
+ });
SendCommand = ReactiveCommand.Create(() => Navigate(NavigationTarget.DialogScreen).To(new SendViewModel(wallet, balanceChanged, History.UnfilteredTransactions)));
@@ -165,7 +162,7 @@ public partial class WalletViewModel : WalletViewModelBase
CoinJoinStateViewModel = new CoinJoinStateViewModel(this, balanceChanged);
}
- public bool IsMusicBoxVisible => _isMusicBoxVisible.Value;
+ public IObservable<bool> IsMusicBoxVisible { get; }
internal CoinJoinStateViewModel CoinJoinStateViewModel { get; }

MODIFY
WalletWasabi.Fluent/Views/Shell/MainView.axaml
WalletWasabi.Fluent/Views/Shell/MainView.axaml
<Panel VerticalAlignment="Bottom"
Height="100">
<spectrum:SpectrumControl Opacity="0.6" IsActive="{Binding IsCoinJoinActive}"
- IsDockEffectVisible="{Binding CurrentWallet^.IsMusicBoxVisible, FallbackValue=False}"
+ IsDockEffectVisible="{Binding CurrentWallet^.IsMusicBoxVisible^, FallbackValue=False}"
Classes.fireEffect="{Binding CurrentWallet^.CoinJoinStateViewModel.IsInCriticalPhase, FallbackValue=False}">
<spectrum:SpectrumControl.Styles>
<Style Selector="spectrum|SpectrumControl.fireEffect">

MODIFY
WalletWasabi.Fluent/Views/Wallets/MusicControlsView.axaml
WalletWasabi.Fluent/Views/Wallets/MusicControlsView.axaml
</Style>
</UserControl.Styles>
<Border Name="PART_MainBorder" Margin="3 3 3 0"
- Classes.IsActive="{Binding IsMusicBoxVisible}"
+ Classes.IsActive="{Binding IsMusicBoxVisible^}"
TextBlock.FontFamily="{StaticResource MonospacedFont}"
CornerRadius="4 4 0 0">
<Border ClipToBounds="True"

don't use oaph for `IsMusicBoxVisible`