mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-28 21:07:57 +01:00
Moves upcoming requirement from existence to current day or later. (#606)
* Moves upcoming requirement from existence to current day or later. * Suppress millis conversion warning
This commit is contained in:
@@ -10,6 +10,8 @@ import tachiyomi.domain.library.model.LibraryManga
|
||||
import tachiyomi.domain.manga.model.Manga
|
||||
import tachiyomi.domain.manga.model.MangaUpdate
|
||||
import tachiyomi.domain.manga.repository.MangaRepository
|
||||
import java.time.LocalDate
|
||||
import java.time.ZoneId
|
||||
|
||||
class MangaRepositoryImpl(
|
||||
private val handler: DatabaseHandler,
|
||||
@@ -65,9 +67,11 @@ class MangaRepositoryImpl(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
override suspend fun getUpcomingManga(statuses: Set<Long>): Flow<List<Manga>> {
|
||||
val epochMillis = LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toEpochSecond() * 1000
|
||||
return handler.subscribeToList {
|
||||
mangasQueries.getUpcomingManga(statuses, MangaMapper::mapManga)
|
||||
mangasQueries.getUpcomingManga(epochMillis, statuses, MangaMapper::mapManga)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user