mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-05-24 00:52:23 -04:00
# Fixed - Fixed: Fixed an issue with filtering, after applying a filter, the cards on screen did not update with the correct information - Fixed: Pagination is now slighlty smaller (only 8 pages) as on mobile, it was cutting off screen. # Changed - Changed: During library scan and series updates, Series names for Epubs will now trim excess white space =============================================== * Fixed issue where some formats could get returned with another format filter. * Filtering was not properly flushing DOM on filter change, updated trackbyidentity to account for filter * One more fix for the filtering bug * Made pagination UI slightly smaller to better fit on mobile phones. Trim() series names for Epub files and Trim() on series update for appropriate fields. * Removed a no longer needed animation.
29 lines
685 B
C#
29 lines
685 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using API.DTOs.Filtering;
|
|
using API.Entities.Enums;
|
|
|
|
namespace API.Extensions
|
|
{
|
|
public static class FilterDtoExtensions
|
|
{
|
|
private static IList<MangaFormat> _allFormats = Enum.GetValues<MangaFormat>();
|
|
|
|
public static IList<MangaFormat> GetSqlFilter(this FilterDto filter)
|
|
{
|
|
var format = filter.MangaFormat;
|
|
if (format != null)
|
|
{
|
|
return new List<MangaFormat>()
|
|
{
|
|
(MangaFormat) format
|
|
};
|
|
}
|
|
else
|
|
{
|
|
return _allFormats;
|
|
}
|
|
}
|
|
}
|
|
}
|