trigger fixes
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/PrivacyRing/PrivacyRingViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/PrivacyRing/PrivacyRingViewModel.cs
@@ -64,21 +64,19 @@ public partial class PrivacyRingViewModel : RoutableViewModel
.Subscribe()
.DisposeWith(disposables);
- _walletViewModel.UiTriggers
- .PrivacyProgressUpdateTrigger
- .Select(_ => _walletViewModel.Wallet.GetPockets())
- .ObserveOn(RxApp.MainThreadScheduler)
- .Subscribe(_ => RefreshCoinsList(itemsSourceList))
- .DisposeWith(disposables);
-
+ var sizeTrigger =
this.WhenAnyValue(x => x.Width, x => x.Height)
.Where(tuple => tuple.Item1 != 0 && tuple.Item2 != 0)
- .Throttle(TimeSpan.FromMilliseconds(100))
+ .Throttle(TimeSpan.FromMilliseconds(100));
+
+ _walletViewModel.UiTriggers
+ .PrivacyProgressUpdateTrigger
+ .CombineLatest(sizeTrigger)
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(x =>
{
- var usableHeight = x.Item2;
- var usableWidth = x.Item1;
+ var usableHeight = x.Second.Item2;
+ var usableWidth = x.Second.Item1;
Margin = new Thickness(usableWidth / 2, usableHeight / 2, 0, 0);
NegativeMargin = new Thickness(Margin.Left * -1, Margin.Top * -1, 0, 0);
RefreshCoinsList(itemsSourceList);

trigger fixes