move sorting stuff to models.sorting
MODIFY
WalletWasabi.Gui/Controls/SortingArrow.cs
WalletWasabi.Gui/Controls/SortingArrow.cs
@@ -12,33 +12,12 @@ using Avalonia.Styling;
using ReactiveUI;
using System;
using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
using System.Reactive.Linq;
using System.Runtime.CompilerServices;
+using WalletWasabi.Gui.Models.Sorting;
namespace WalletWasabi.Gui.Controls
{
- public enum SortOrder
- {
- None,
- Increasing,
- Decreasing
- }
-
- public struct SortingPreference : IEquatable<SortingPreference>
- {
- public SortingPreference(SortOrder sortOrder, string colTarget)
- {
- SortOrder = sortOrder;
- ColumnTarget = colTarget;
- }
-
- public SortOrder SortOrder { get; set; }
- public string ColumnTarget { get; set; }
-
- public bool Equals([AllowNull] SortingPreference other) => SortOrder == other.SortOrder && ColumnTarget == other.ColumnTarget;
- }
-
public class SortingArrow : Button, IStyleable
{
public static readonly StyledProperty<SortOrder> SortDirectionProperty =

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
@@ -14,6 +14,7 @@ using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Threading.Tasks;
using WalletWasabi.Gui.Models;
+using WalletWasabi.Gui.Models.Sorting;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Logging;
using WalletWasabi.Blockchain.TransactionOutputs;

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/HistoryTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/HistoryTabViewModel.cs
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Gui.Helpers;
using WalletWasabi.Gui.ViewModels;
+using WalletWasabi.Gui.Models.Sorting;
using WalletWasabi.Logging;
using WalletWasabi.Models;
using WalletWasabi.Wallets;

MODIFY
WalletWasabi.Gui/Converters/SortingPreferenceJsonConverter.cs
WalletWasabi.Gui/Converters/SortingPreferenceJsonConverter.cs
using Newtonsoft.Json;
using System;
-using WalletWasabi.Gui.Controls;
+using WalletWasabi.Gui.Models.Sorting;
namespace WalletWasabi.Gui.Converters
{

ADD
WalletWasabi.Gui/Models/Sorting/SortOrder.cs
+namespace WalletWasabi.Gui.Models.Sorting
+{
+ public enum SortOrder
+ {
+ None,
+ Increasing,
+ Decreasing
+ }
+}

ADD
WalletWasabi.Gui/Models/Sorting/SortingPreference.cs
+using System;
+using System.Diagnostics.CodeAnalysis;
+
+namespace WalletWasabi.Gui.Models.Sorting
+{
+ public struct SortingPreference : IEquatable<SortingPreference>
+ {
+ public SortingPreference(SortOrder sortOrder, string colTarget)
+ {
+ SortOrder = sortOrder;
+ ColumnTarget = colTarget;
+ }
+
+ public SortOrder SortOrder { get; set; }
+ public string ColumnTarget { get; set; }
+
+ public bool Equals([AllowNull] SortingPreference other) => SortOrder == other.SortOrder && ColumnTarget == other.ColumnTarget;
+ }
+}

MODIFY
WalletWasabi.Gui/UiConfig.cs
WalletWasabi.Gui/UiConfig.cs
@@ -12,6 +12,7 @@ using WalletWasabi.Bases;
using WalletWasabi.Gui.Controls;
using WalletWasabi.Gui.Converters;
using WalletWasabi.Gui.Models;
+using WalletWasabi.Gui.Models.Sorting;
using WalletWasabi.Helpers;
using WalletWasabi.Interfaces;
using WalletWasabi.JsonConverters;

move sorting stuff to models.sorting