enable sorting on label column
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Receive/AddressViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Receive/AddressViewModel.cs
@@ -5,6 +5,7 @@ using System.Windows.Input;
using Avalonia;
using NBitcoin;
using ReactiveUI;
+using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Wallets;
@@ -18,7 +19,7 @@ public partial class AddressViewModel : ViewModelBase
{
_address = model.GetP2wpkhAddress(network).ToString();
- Label = model.Label.ToList();
+ Label = model.Label;
CopyAddressCommand =
ReactiveCommand.CreateFromTask(async () =>
@@ -46,7 +47,7 @@ public partial class AddressViewModel : ViewModelBase
public ReactiveCommand<Unit, Unit> NavigateCommand { get; }
- public List<string> Label { get; }
+ public SmartLabel Label { get; }
public static Comparison<AddressViewModel?> SortAscending<T>(Func<AddressViewModel, T> selector)
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveAddressesViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveAddressesViewModel.cs
@@ -76,7 +76,9 @@ public partial class ReceiveAddressesViewModel : RoutableViewModel
options: new ColumnOptions<AddressViewModel>
{
CanUserResizeColumn = false,
- CanUserSortColumn = false
+ CanUserSortColumn = true,
+ CompareAscending = AddressViewModel.SortAscending(x => x.Label),
+ CompareDescending = AddressViewModel.SortDescending(x => x.Label)
},
width: new GridLength(210, GridUnitType.Pixel))
}

enable sorting on label column