aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs')
-rw-r--r--src/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs b/src/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs
deleted file mode 100644
index 224f78f4..00000000
--- a/src/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using Ryujinx.UI.App.Common;
-using System;
-using System.Collections.Generic;
-
-namespace Ryujinx.Ava.UI.Models.Generic
-{
- internal class LastPlayedSortComparer : IComparer<ApplicationData>
- {
- public LastPlayedSortComparer() { }
- public LastPlayedSortComparer(bool isAscending) { IsAscending = isAscending; }
-
- public bool IsAscending { get; }
-
- public int Compare(ApplicationData x, ApplicationData y)
- {
- DateTime aValue = DateTime.UnixEpoch, bValue = DateTime.UnixEpoch;
-
- if (x?.LastPlayed != null)
- {
- aValue = x.LastPlayed.Value;
- }
-
- if (y?.LastPlayed != null)
- {
- bValue = y.LastPlayed.Value;
- }
-
- return (IsAscending ? 1 : -1) * DateTime.Compare(aValue, bValue);
- }
- }
-}