Tap to Paginate User Pref (#197)

* Fixed In Progress and removed comments

* Tap to Paginate user setting is implemented. Fixes #193
This commit is contained in:
Joseph Milazzo 2021-05-04 17:01:27 -05:00 committed by GitHub
parent 9c43833989
commit 2be1630af3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 803 additions and 3 deletions

View file

@ -350,14 +350,14 @@ namespace API.Data
.ToList();
series = series.Where(s => s.AppUserId == userId
&& s.PagesRead > 0
&& s.PagesRead < s.Series.Pages - 1 // - 1 because when reading, we start at 0 then go to pages - 1. But when summing, pages assumes starting at 1
&& s.PagesRead < s.Series.Pages
&& userLibraries.Contains(s.Series.LibraryId));
}
else
{
series = series.Where(s => s.AppUserId == userId
&& s.PagesRead > 0
&& s.PagesRead < s.Series.Pages - 1 // - 1 because when reading, we start at 0 then go to pages - 1. But when summing, pages assumes starting at 1
&& s.PagesRead < s.Series.Pages
&& s.Series.LibraryId == libraryId);
}
var retSeries = await series
@ -367,7 +367,7 @@ namespace API.Data
.AsNoTracking()
.ToListAsync();
return retSeries.DistinctBy(s => s.Name).Take(limit); // SeriesDTO might need date information
return retSeries.DistinctBy(s => s.Name).Take(limit);
}
}
}