Avoid some crashes

This commit is contained in:
arkon
2022-10-26 18:12:11 -04:00
parent 3fb42b6ce9
commit ca06516900
3 changed files with 7 additions and 8 deletions

View File

@@ -52,7 +52,7 @@ class CategoryRepositoryImpl(
}
override suspend fun updatePartial(updates: List<CategoryUpdate>) {
handler.await(true) {
handler.await(inTransaction = true) {
for (update in updates) {
updatePartialBlocking(update)
}

View File

@@ -74,7 +74,7 @@ class MangaRepositoryImpl(
}
override suspend fun insert(manga: Manga): Long? {
return handler.awaitOneOrNull {
return handler.awaitOneOrNull(inTransaction = true) {
mangasQueries.insert(
source = manga.source,
url = manga.url,