don't use oaph for `CurrentWallet`
MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -23,7 +23,6 @@ namespace WalletWasabi.Fluent.ViewModels;
public partial class MainViewModel : ViewModelBase
{
- private readonly ObservableAsPropertyHelper<WalletViewModel?> _currentWallet;
private readonly SettingsPageViewModel _settingsPage;
private readonly PrivacyModeViewModel _privacyMode;
private readonly AddWalletPageViewModel _addWalletPage;
@@ -144,11 +143,10 @@ public partial class MainViewModel : ViewModelBase
}
});
- _currentWallet =
+ CurrentWallet =
this.WhenAnyValue(x => x.MainScreen.CurrentPage)
.WhereNotNull()
- .OfType<WalletViewModel>()
- .ToProperty(this, x => x.CurrentWallet);
+ .OfType<WalletViewModel>();
IsOobeBackgroundVisible = Services.UiConfig.Oobe;
@@ -172,7 +170,7 @@ public partial class MainViewModel : ViewModelBase
SearchBar = new SearchBarViewModel(source.Changes);
}
- public WalletViewModel? CurrentWallet => _currentWallet.Value;
+ public IObservable<WalletViewModel> CurrentWallet { get; }
public TargettedNavigationStack MainScreen { 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}"
- Classes.fireEffect="{Binding CurrentWallet.CoinJoinStateViewModel.IsInCriticalPhase, FallbackValue=False}">
+ IsDockEffectVisible="{Binding CurrentWallet^.IsMusicBoxVisible, FallbackValue=False}"
+ Classes.fireEffect="{Binding CurrentWallet^.CoinJoinStateViewModel.IsInCriticalPhase, FallbackValue=False}">
<spectrum:SpectrumControl.Styles>
<Style Selector="spectrum|SpectrumControl.fireEffect">
<Setter Property="Foreground" Value="{StaticResource OrangeCoinColor}" />
<Setter Property="Margin" Value="31 26 31 0" />
</Style>
</DockPanel.Styles>
- <wallets:MusicControlsView DockPanel.Dock="Bottom" DataContext="{Binding CurrentWallet}"
+ <wallets:MusicControlsView DockPanel.Dock="Bottom" DataContext="{Binding CurrentWallet^}"
HorizontalAlignment="Center" Height="66" />
<ContentControl ClipToBounds="False" Content="{Binding MainScreen.CurrentPage}" />
</DockPanel>

don't use oaph for `CurrentWallet`