Fix nullable warning, remove unnecessary AutoNotify
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinsViewModel.cs
@@ -28,7 +28,6 @@ public partial class WalletCoinsViewModel : RoutableViewModel
private readonly ObservableCollectionExtended<WalletCoinViewModel> _coins;
private readonly SourceList<WalletCoinViewModel> _coinsSourceList = new();
[AutoNotify] private FlatTreeDataGridSource<WalletCoinViewModel>? _source;
- [AutoNotify] private IObservable<bool> _anySelected;
public WalletCoinsViewModel(WalletViewModel walletViewModel, IObservable<Unit> balanceChanged)
{
@@ -39,8 +38,16 @@ public partial class WalletCoinsViewModel : RoutableViewModel
_coins = new ObservableCollectionExtended<WalletCoinViewModel>();
SkipCommand = ReactiveCommand.CreateFromTask(OnSendCoins);
+
+ AnySelected = _coinsSourceList
+ .Connect()
+ .AutoRefresh(x => x.IsSelected)
+ .ToCollection()
+ .Select(items => items.Any(t => t.IsSelected));
}
+ public IObservable<bool> AnySelected { get; }
+
private async Task OnSendCoins()
{
var wallet = _walletViewModel.Wallet;
@@ -89,12 +96,6 @@ public partial class WalletCoinsViewModel : RoutableViewModel
.Subscribe()
.DisposeWith(disposables);
- AnySelected = _coinsSourceList
- .Connect()
- .AutoRefresh(x => x.IsSelected)
- .ToCollection()
- .Select(items => items.Any(t => t.IsSelected));
-
Observable.Timer(TimeSpan.FromSeconds(30))
.Subscribe(_ =>
{

Fix nullable warning, remove unnecessary AutoNotify