Add Children property
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/HistoryItemViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/HistoryItemViewModelBase.cs
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Reactive.Linq;
using System.Threading.Tasks;
using System.Windows.Input;
@@ -16,6 +17,7 @@ public abstract partial class HistoryItemViewModelBase : ViewModelBase
[AutoNotify] private string _dateString = "";
[AutoNotify] private bool _isConfirmed;
[AutoNotify] private bool _isExpanded;
+ private ObservableCollection<HistoryItemViewModelBase>? _children;
protected HistoryItemViewModelBase(int orderIndex, TransactionSummary transactionSummary)
{
@@ -39,6 +41,8 @@ public abstract partial class HistoryItemViewModelBase : ViewModelBase
public bool IsCoinJoin { get; protected set; }
+ public IReadOnlyList<HistoryItemViewModelBase> Children => _children ??= LoadChildren();
+
public Money? Balance { get; protected set; }
public Money? OutgoingAmount { get; protected set; }
@@ -47,6 +51,11 @@ public abstract partial class HistoryItemViewModelBase : ViewModelBase
public ICommand? ShowDetailsCommand { get; protected set; }
+ protected virtual ObservableCollection<HistoryItemViewModelBase> LoadChildren()
+ {
+ throw new NotSupportedException();
+ }
+
public virtual void Update(HistoryItemViewModelBase item)
{
OrderIndex = item.OrderIndex;

Add Children property