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:
parent
ae13775791
commit
f0c516ab62
3 changed files with 16 additions and 6 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue