Use SQLDelight for all Chapter related queries (#7440)

This commit is contained in:
Andreas
2022-07-03 00:51:33 +02:00
committed by GitHub
parent 76c0ead1db
commit 29633b64aa
9 changed files with 63 additions and 65 deletions

View File

@@ -99,4 +99,8 @@ class ChapterRepositoryImpl(
override suspend fun getChapterByMangaIdAsFlow(mangaId: Long): Flow<List<Chapter>> {
return handler.subscribeToList { chaptersQueries.getChaptersByMangaId(mangaId, chapterMapper) }
}
override suspend fun getChapterByUrlAndMangaId(url: String, mangaId: Long): Chapter? {
return handler.awaitOneOrNull { chaptersQueries.getChapterByUrlAndMangaId(url, mangaId, chapterMapper) }
}
}