Fix default category showing up in edit manga categories list
Also remove some usages of runBlocking
This commit is contained in:
+1
-1
@@ -389,7 +389,7 @@ open class BrowseSourcePresenter(
|
||||
suspend fun getCategories(): List<DomainCategory> {
|
||||
return getCategories.subscribe()
|
||||
.firstOrNull()
|
||||
?.filterNot { it.id == DomainCategory.UNCATEGORIZED_ID }
|
||||
?.filterNot { it.isSystemCategory }
|
||||
?: emptyList()
|
||||
}
|
||||
|
||||
|
||||
+1
-9
@@ -32,14 +32,6 @@ import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
/**
|
||||
* Presenter of [GlobalSearchController]
|
||||
* Function calls should be done from here. UI calls should be done from the controller.
|
||||
*
|
||||
* @param sourceManager manages the different sources.
|
||||
* @param db manages the database calls.
|
||||
* @param preferences manages the preference calls.
|
||||
*/
|
||||
open class GlobalSearchPresenter(
|
||||
private val initialQuery: String? = "",
|
||||
private val initialExtensionFilter: String? = null,
|
||||
@@ -256,7 +248,7 @@ open class GlobalSearchPresenter(
|
||||
val networkManga = source.getMangaDetails(manga.toMangaInfo())
|
||||
manga.copyFrom(networkManga.toSManga())
|
||||
manga.initialized = true
|
||||
runBlocking { updateManga.await(manga.toDomainManga()!!.toMangaUpdate()) }
|
||||
updateManga.await(manga.toDomainManga()!!.toMangaUpdate())
|
||||
return manga
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user