Implement sorting and display of file size in the table view

* Display the file size in the Book Metadata details section
* Implement sorting and display of file size in the table view
* Implement AppMigration feature
* Populate missing file sizes for books with null file size in 'populateFileSizes' migration
* Implement sorting and display of file size in the table view

---------

Co-authored-by: adityachandelgit
This commit is contained in:
Aditya Chandel
2025-04-25 13:56:38 -06:00
committed by GitHub
co-authored by adityachandelgit
parent 2df8e193cc
commit d855acd426
4 changed files with 14 additions and 1 deletions
@@ -24,7 +24,8 @@ export class SortService {
.filter((key) => key.endsWith('Locked'))
.every((key) => book.metadata?.[key] === true),
lastReadTime: (book) => book.lastReadTime ? new Date(book.lastReadTime).getTime() : null,
addedOn: (book) => book.addedOn ? new Date(book.addedOn).getTime() : null
addedOn: (book) => book.addedOn ? new Date(book.addedOn).getTime() : null,
fileSizeKb: (book) => book.fileSizeKb || null
};
applySort(books: Book[], selectedSort: SortOption | null): Book[] {