New Feature: Introduce Upcoming page to Mihon (#420)

* Work in progress upcoming feature

* Checkpointing WIP upcoming feature

* Functional Upcoming Screen

* Rename UpdateCalendar to UpdateUpcoming

* Converted Strings to resources

* Cleanup

* Fixed detekt issues

* Removed Link icon per @AntsyLich's suggestion.

* Detekt

* Fixed Calendar display on wide form factor devices

* Added Key to upcoming lazycolumn

* Updated tablet mode UI to support two column view

* Updated header creation logic

* Updated header creation logic... again

* Moved stray string to resources

* Fixed PR Comments and query refactor

* Tweaks to query, refactored to flow, comments on calendar

* Switched to Date Formatter

* Cleaned up date formatter

* More Refactor work

* Updated Calendar to support localized week formats

* Fixed year format

* Refactored Header animation

* Moved upcoming FAQ

* Completed YearMonth Migration

* Replaced currentYearMonth with delegate

* Even more cleanup

* cleaned up alignment modifiers

* Click Handler and other refactors

* Removed Wrapped Content Height/Size/extra clips

* Huge Refactor for CalendarDay

* Another cleanup attempt

* Migrated to new mihon.feature.* module pattern

* changed access modifier

* A Bunch of changes from the next round of reviews

* Cleanups

* Cleanup 2

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
Maddie Witman
2024-03-28 15:02:33 -04:00
committed by GitHub
parent 0265c16eb2
commit 72222ad86d
22 changed files with 797 additions and 2 deletions

View File

@ -65,6 +65,12 @@ class MangaRepositoryImpl(
}
}
override suspend fun getUpcomingManga(statuses: Set<Long>): Flow<List<Manga>> {
return handler.subscribeToList {
mangasQueries.getUpcomingManga(statuses, MangaMapper::mapManga)
}
}
override suspend fun resetViewerFlags(): Boolean {
return try {
handler.await { mangasQueries.resetViewerFlags() }

View File

@ -112,6 +112,14 @@ WHERE favorite = 1
AND LOWER(title) = :title
AND _id != :id;
getUpcomingManga:
SELECT *
FROM mangas
WHERE next_update > 0
AND favorite = 1
AND status IN :statuses
ORDER BY next_update ASC;
resetViewerFlags:
UPDATE mangas
SET viewer = 0;