Refactor network to local manga logic

Maybe fixes #8289
This commit is contained in:
arkon
2022-10-26 23:01:21 -04:00
parent 5b3f9e082e
commit d5b4bb49b1
9 changed files with 72 additions and 81 deletions

View File

@@ -25,7 +25,7 @@ class MangaRepositoryImpl(
}
override suspend fun getMangaByUrlAndSourceId(url: String, sourceId: Long): Manga? {
return handler.awaitOneOrNull { mangasQueries.getMangaByUrlAndSource(url, sourceId, mangaMapper) }
return handler.awaitOneOrNull(inTransaction = true) { mangasQueries.getMangaByUrlAndSource(url, sourceId, mangaMapper) }
}
override fun getMangaByUrlAndSourceIdAsFlow(url: String, sourceId: Long): Flow<Manga?> {