You can now send emails if you don't use Authentication (#2718)

This commit is contained in:
Joe Milazzo 2024-02-14 14:36:55 -06:00 committed by GitHub
parent 2d81527bd1
commit 7b7609652c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 414 additions and 350 deletions

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using API.Services.Tasks.Scanner.Parser;
namespace API.Comparators;
@ -17,11 +18,11 @@ public class ChapterSortComparer : IComparer<double>
/// <returns></returns>
public int Compare(double x, double y)
{
if (x == 0.0 && y == 0.0) return 0;
if (x == Parser.DefaultChapterNumber && y == Parser.DefaultChapterNumber) return 0;
// if x is 0, it comes second
if (x == 0.0) return 1;
if (x == Parser.DefaultChapterNumber) return 1;
// if y is 0, it comes second
if (y == 0.0) return -1;
if (y == Parser.DefaultChapterNumber) return -1;
return x.CompareTo(y);
}
@ -40,11 +41,11 @@ public class ChapterSortComparerZeroFirst : IComparer<double>
{
public int Compare(double x, double y)
{
if (x == 0.0 && y == 0.0) return 0;
if (x == Parser.DefaultChapterNumber && y == Parser.DefaultChapterNumber) return 0;
// if x is 0, it comes first
if (x == 0.0) return -1;
if (x == Parser.DefaultChapterNumber) return -1;
// if y is 0, it comes first
if (y == 0.0) return 1;
if (y == Parser.DefaultChapterNumber) return 1;
return x.CompareTo(y);
}
@ -56,11 +57,11 @@ public class SortComparerZeroLast : IComparer<double>
{
public int Compare(double x, double y)
{
if (x == 0.0 && y == 0.0) return 0;
if (x == Parser.DefaultChapterNumber && y == Parser.DefaultChapterNumber) return 0;
// if x is 0, it comes last
if (x == 0.0) return 1;
if (x == Parser.DefaultChapterNumber) return 1;
// if y is 0, it comes last
if (y == 0.0) return -1;
if (y == Parser.DefaultChapterNumber) return -1;
return x.CompareTo(y);
}