Remove unused AddTag code
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Labels/SuggestionLabelViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Labels/SuggestionLabelViewModel.cs
-using System;
-using System.Windows.Input;
-using ReactiveUI;
-
namespace WalletWasabi.Fluent.ViewModels.Wallets.Labels
{
public class SuggestionLabelViewModel : ViewModelBase
{
- public SuggestionLabelViewModel(string label, int count, Action<string> addTag)
+ public SuggestionLabelViewModel(string label, int count)
{
Label = label;
Count = count;
- AddTagCommand = ReactiveCommand.Create(addTag);
}
public string Label { get; }
public int Count { get; }
-
- public ICommand AddTagCommand { get; }
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Labels/SuggestionLabelsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Labels/SuggestionLabelsViewModel.cs
using System;
-using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reactive;
@@ -17,7 +16,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Labels
private readonly ObservableCollectionExtended<string> _topSuggestions;
private readonly ObservableCollectionExtended<string> _suggestions;
private readonly ObservableCollectionExtended<string> _labels;
- private Action<string>? _addTag;
public SuggestionLabelsViewModel(int topSuggestionsCount)
{
@@ -28,8 +26,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Labels
UpdateLabels();
CreateSuggestions(topSuggestionsCount);
-
- SetAddTag = (addTag) => _addTag = addTag;
}
public ObservableCollection<string> TopSuggestions => _topSuggestions;
@@ -38,8 +34,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Labels
public ObservableCollection<string> Labels => _labels;
- public Action<Action<string>>? SetAddTag { get; }
-
public void UpdateLabels()
{
var labels = WalletHelpers.GetLabels();
@@ -55,7 +49,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Labels
_sourceLabels.Clear();
_sourceLabels.AddRange(
- mostUsedLabels.Select(x => new SuggestionLabelViewModel(x.Label, x.Count, label => _addTag?.Invoke(label))));
+ mostUsedLabels.Select(x => new SuggestionLabelViewModel(x.Label, x.Count)));
}
private void CreateSuggestions(int topSuggestionsCount)

Remove unused AddTag code