Skip to content

Commit

Permalink
fix: disabled sorting since the sorting is weird
Browse files Browse the repository at this point in the history
  • Loading branch information
Thundernerd committed Jan 1, 2024
1 parent 17cf40c commit aee1686
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/Mangarr.Frontend/Pages/Activity/Content.razor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using FluentResults;
using Mangarr.Frontend.Api;
using Mangarr.Shared.Models;
using Mangarr.Shared.Responses;
using Mangarr.Frontend.Api;
using Microsoft.AspNetCore.Components;

namespace Mangarr.Frontend.Pages.Activity;
Expand Down Expand Up @@ -31,22 +31,22 @@ private async void RefreshAsync()
{
_items.Clear();
_items.AddRange(result.Value.Data);
_items.Sort((lhs, rhs) =>
{
int comparison = rhs.IsActive.CompareTo(lhs.IsActive);
if (comparison != 0)
{
return comparison;
}

comparison = string.Compare(lhs.MangaTitle, rhs.MangaTitle, StringComparison.Ordinal);
if (comparison != 0)
{
return comparison;
}

return lhs.ChapterNumber.CompareTo(rhs.ChapterNumber);
});
// _items.Sort((lhs, rhs) =>
// {
// int comparison = rhs.IsActive.CompareTo(lhs.IsActive);
// if (comparison != 0)
// {
// return comparison;
// }
//
// comparison = string.Compare(lhs.MangaTitle, rhs.MangaTitle, StringComparison.Ordinal);
// if (comparison != 0)
// {
// return comparison;
// }
//
// return lhs.ChapterNumber.CompareTo(rhs.ChapterNumber);
// });
}

_isRefreshing = false;
Expand Down

0 comments on commit aee1686

Please sign in to comment.