Refresh UI when cluster changes
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -26,6 +26,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private ObservableAsPropertyHelper<bool> _unspent;
private ObservableAsPropertyHelper<bool> _confirmed;
private ObservableAsPropertyHelper<bool> _unavailable;
+ private ObservableAsPropertyHelper<string> _cluster;
private ObservableAsPropertyHelper<string> _expandMenuCaption;
private bool _isExpanded;
public ReactiveCommand<Unit, bool> ToggleDetails { get; }
@@ -62,6 +63,12 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
.ToProperty(this, x => x.Confirmed, scheduler: RxApp.MainThreadScheduler)
.DisposeWith(Disposables);
+ _cluster = Model
+ .WhenAnyValue(x => x.Clusters, x => x.Clusters.Labels)
+ .Select(x => x.Item2.ToString())
+ .ToProperty(this, x => x.Clusters, scheduler: RxApp.MainThreadScheduler)
+ .DisposeWith(Disposables);
+
_unavailable = Model
.WhenAnyValue(x => x.Unavailable)
.ToProperty(this, x => x.Unavailable, scheduler: RxApp.MainThreadScheduler)
@@ -178,7 +185,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public string InCoinJoin => Model.CoinJoinInProgress ? "Yes" : "No";
- public string Clusters => Model.Clusters.Labels; // If the value is null the bind do not update the view. It shows the previous state for example: ##### even if PrivMode false.
+ public string Clusters => _cluster?.Value ?? "";
public string PubKey => Model.HdPubKey?.PubKey?.ToString() ?? "";

Refresh UI when cluster changes