Manga Redesign (#321)

* Code cleanup, refactored FileRepository into Unit of Work.

* Added AutoCloseMenu and ReaderMode user perferences to match UI

* Added extra information to ChapterInfo

* Build changes

* Updated the readme to have open collective information and thanks to sponsors

* Fixed an issue with UnitOfWork refactor and how stats was bootsrapped. Replaced stats.kavitareader with a temp url to test out redirection bug.
This commit is contained in:
Joseph Milazzo 2021-06-24 19:31:42 -05:00 committed by GitHub
parent b958342394
commit be2b78fa5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 1608 additions and 87 deletions

View file

@ -2,7 +2,7 @@
// Version 2
// Taken from: https://www.codeproject.com/Articles/11016/Numeric-String-Sort-in-C
using System;
using static System.Char;
namespace API.Comparators
{
@ -20,26 +20,26 @@ namespace API.Comparators
if (string.IsNullOrEmpty(s2)) return -1;
//WE style, special case
var sp1 = Char.IsLetterOrDigit(s1, 0);
var sp2 = Char.IsLetterOrDigit(s2, 0);
var sp1 = IsLetterOrDigit(s1, 0);
var sp2 = IsLetterOrDigit(s2, 0);
if(sp1 && !sp2) return 1;
if(!sp1 && sp2) return -1;
int i1 = 0, i2 = 0; //current index
while(true)
{
var c1 = Char.IsDigit(s1, i1);
var c2 = Char.IsDigit(s2, i2);
var c1 = IsDigit(s1, i1);
var c2 = IsDigit(s2, i2);
int r; // temp result
if(!c1 && !c2)
{
bool letter1 = Char.IsLetter(s1, i1);
bool letter2 = Char.IsLetter(s2, i2);
bool letter1 = IsLetter(s1, i1);
bool letter2 = IsLetter(s2, i2);
if((letter1 && letter2) || (!letter1 && !letter2))
{
if(letter1 && letter2)
{
r = Char.ToLower(s1[i1]).CompareTo(Char.ToLower(s2[i2]));
r = ToLower(s1[i1]).CompareTo(ToLower(s2[i2]));
}
else
{
@ -114,8 +114,8 @@ namespace API.Comparators
{
nzStart = start;
end = start;
bool countZeros = true;
while(Char.IsDigit(s, end))
var countZeros = true;
while(IsDigit(s, end))
{
if(countZeros && s[end].Equals('0'))
{