Fix selecting custom fetch interval not persisting sometimes

This commit is contained in:
arkon
2024-01-07 15:28:56 -05:00
parent bce6af62fc
commit e6c6c32d81
6 changed files with 43 additions and 47 deletions

View File

@@ -81,9 +81,9 @@ class UpdateManga(
dateTime: ZonedDateTime = ZonedDateTime.now(),
window: Pair<Long, Long> = fetchInterval.getWindow(dateTime),
): Boolean {
return fetchInterval.toMangaUpdateOrNull(manga, dateTime, window)
?.let { mangaRepository.update(it) }
?: false
return mangaRepository.update(
fetchInterval.toMangaUpdate(manga, dateTime, window),
)
}
suspend fun awaitUpdateLastUpdate(mangaId: Long): Boolean {