mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	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:
		| @@ -0,0 +1,20 @@ | ||||
| package mihon.domain.upcoming.interactor | ||||
|  | ||||
| import eu.kanade.tachiyomi.source.model.SManga | ||||
| import kotlinx.coroutines.flow.Flow | ||||
| import tachiyomi.domain.manga.model.Manga | ||||
| import tachiyomi.domain.manga.repository.MangaRepository | ||||
|  | ||||
| class GetUpcomingManga( | ||||
|     private val mangaRepository: MangaRepository, | ||||
| ) { | ||||
|  | ||||
|     private val includedStatuses = setOf( | ||||
|         SManga.ONGOING.toLong(), | ||||
|         SManga.PUBLISHING_FINISHED.toLong(), | ||||
|     ) | ||||
|  | ||||
|     suspend fun subscribe(): Flow<List<Manga>> { | ||||
|         return mangaRepository.getUpcomingManga(includedStatuses) | ||||
|     } | ||||
| } | ||||
| @@ -25,6 +25,8 @@ interface MangaRepository { | ||||
|  | ||||
|     suspend fun getDuplicateLibraryManga(id: Long, title: String): List<Manga> | ||||
|  | ||||
|     suspend fun getUpcomingManga(statuses: Set<Long>): Flow<List<Manga>> | ||||
|  | ||||
|     suspend fun resetViewerFlags(): Boolean | ||||
|  | ||||
|     suspend fun setMangaCategories(mangaId: Long, categoryIds: List<Long>) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user