mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-29 21:23:21 -05:00
Minor cleanup
This commit is contained in:
parent
b96686e6ad
commit
5ccde61ae1
4 changed files with 4 additions and 4 deletions
|
@ -100,7 +100,7 @@ class ChapterRepositoryImpl(
|
||||||
return handler.awaitList { chaptersQueries.getChaptersByMangaId(mangaId, chapterMapper) }
|
return handler.awaitList { chaptersQueries.getChaptersByMangaId(mangaId, chapterMapper) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getChapterByMangaIdFlow(mangaId: Long): Flow<List<Chapter>> {
|
override suspend fun getChapterByMangaIdAsFlow(mangaId: Long): Flow<List<Chapter>> {
|
||||||
return handler.subscribeToList { chaptersQueries.getChaptersByMangaId(mangaId, chapterMapper) }
|
return handler.subscribeToList { chaptersQueries.getChaptersByMangaId(mangaId, chapterMapper) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class GetChapterByMangaId(
|
||||||
|
|
||||||
suspend fun subscribe(mangaId: Long): Flow<List<Chapter>> {
|
suspend fun subscribe(mangaId: Long): Flow<List<Chapter>> {
|
||||||
return try {
|
return try {
|
||||||
chapterRepository.getChapterByMangaIdFlow(mangaId)
|
chapterRepository.getChapterByMangaIdAsFlow(mangaId)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
logcat(LogPriority.ERROR, e)
|
logcat(LogPriority.ERROR, e)
|
||||||
flowOf(emptyList())
|
flowOf(emptyList())
|
||||||
|
|
|
@ -16,5 +16,5 @@ interface ChapterRepository {
|
||||||
|
|
||||||
suspend fun getChapterByMangaId(mangaId: Long): List<Chapter>
|
suspend fun getChapterByMangaId(mangaId: Long): List<Chapter>
|
||||||
|
|
||||||
suspend fun getChapterByMangaIdFlow(mangaId: Long): Flow<List<Chapter>>
|
suspend fun getChapterByMangaIdAsFlow(mangaId: Long): Flow<List<Chapter>>
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
||||||
else -> "$url/multisrc/overrides/$pkgFactory/" + (pkgName.split(".").lastOrNull() ?: "") + path
|
else -> "$url/multisrc/overrides/$pkgFactory/" + (pkgName.split(".").lastOrNull() ?: "") + path
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
url + "/src/" + pkgName.replace(".", "/") + path
|
url + "/src/" + pkgName.replace(".", "/") + path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue