Use SQLDelight for a Category related queries (#7438)
This commit is contained in:
+3
-3
@@ -372,9 +372,9 @@ open class BrowseSourcePresenter(
|
||||
* @param manga the manga to get categories from.
|
||||
* @return Array of category ids the manga is in, if none returns default id
|
||||
*/
|
||||
fun getMangaCategoryIds(manga: Manga): Array<Long?> {
|
||||
val categories = db.getCategoriesForManga(manga.id!!).executeAsBlocking()
|
||||
return categories.mapNotNull { it?.id?.toLong() }.toTypedArray()
|
||||
suspend fun getMangaCategoryIds(manga: Manga): Array<Long?> {
|
||||
val categories = getCategories.await(manga.id!!)
|
||||
return categories.map { it.id }.toTypedArray()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user