Sort series by chapter number only when some chapters have no volume (#1487)

* Sort series by chapter number only when some chapters have no volume information

* Implement a Default static instance of ChapterSortComparer

* Further use Default static Comparers

* Add missing ToLit() as per comments
This commit is contained in:
tjarls 2022-08-28 22:39:35 +01:00 committed by GitHub
parent ae13775791
commit f0c516ab62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

View file

@ -23,6 +23,8 @@ namespace API.Comparators
return x.CompareTo(y);
}
public static readonly ChapterSortComparer Default = new ChapterSortComparer();
}
/// <summary>
@ -44,6 +46,8 @@ namespace API.Comparators
return x.CompareTo(y);
}
public static readonly ChapterSortComparerZeroFirst Default = new ChapterSortComparerZeroFirst();
}
public class SortComparerZeroLast : IComparer<double>