mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Exract struct to reuse it
This commit is contained in:
parent
811c3fcfe4
commit
b8ad99fcaa
@ -23,13 +23,6 @@ using stefanfrings::HttpResponse;
|
|||||||
using stefanfrings::HttpSession;
|
using stefanfrings::HttpSession;
|
||||||
using stefanfrings::Template;
|
using stefanfrings::Template;
|
||||||
|
|
||||||
struct LibraryItemSorter {
|
|
||||||
bool operator()(const LibraryItem *a, const LibraryItem *b) const
|
|
||||||
{
|
|
||||||
return naturalSortLessThanCI(a->name, b->name);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
FolderController::FolderController() { }
|
FolderController::FolderController() { }
|
||||||
|
|
||||||
void FolderController::service(HttpRequest &request, HttpResponse &response)
|
void FolderController::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -19,13 +19,6 @@ using stefanfrings::HttpRequest;
|
|||||||
using stefanfrings::HttpResponse;
|
using stefanfrings::HttpResponse;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
struct LibraryItemSorter {
|
|
||||||
bool operator()(const LibraryItem *a, const LibraryItem *b) const
|
|
||||||
{
|
|
||||||
return naturalSortLessThanCI(a->name, b->name);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
FolderContentControllerV2::FolderContentControllerV2() { }
|
FolderContentControllerV2::FolderContentControllerV2() { }
|
||||||
|
|
||||||
void FolderContentControllerV2::service(HttpRequest &request, HttpResponse &response)
|
void FolderContentControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||||
|
@ -13,4 +13,15 @@ bool naturalSortLessThanCI(const QString &left, const QString &right);
|
|||||||
bool naturalSortLessThanCIFileInfo(const QFileInfo &left, const QFileInfo &right);
|
bool naturalSortLessThanCIFileInfo(const QFileInfo &left, const QFileInfo &right);
|
||||||
bool naturalSortLessThanCILibraryItem(LibraryItem *left, LibraryItem *right);
|
bool naturalSortLessThanCILibraryItem(LibraryItem *left, LibraryItem *right);
|
||||||
|
|
||||||
|
/* TODO, update to use the issue number once the iOS client supports it
|
||||||
|
* see DBHelper::getFolderComicsFromLibraryForReading
|
||||||
|
* NOTE, use this only in the server side for now, this way of sorting just matchs what's used in the iOS client
|
||||||
|
**/
|
||||||
|
struct LibraryItemSorter {
|
||||||
|
bool operator()(const LibraryItem *a, const LibraryItem *b) const
|
||||||
|
{
|
||||||
|
return naturalSortLessThanCI(a->name, b->name);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user