mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-15 05:27:28 +01:00
Cleanup Library after Compose changes (#7584)
This commit is contained in:
@@ -411,7 +411,7 @@ class LibraryPresenter(
|
||||
* @return an observable of the categories and its manga.
|
||||
*/
|
||||
private fun getLibraryObservable(): Observable<Library> {
|
||||
return combine(getCategoriesObservable(), getLibraryMangasObservable()) { dbCategories, libraryManga ->
|
||||
return combine(getCategoriesFlow(), getLibraryMangasFlow()) { dbCategories, libraryManga ->
|
||||
val categories = if (libraryManga.containsKey(0)) {
|
||||
arrayListOf(Category.default(context)) + dbCategories
|
||||
} else {
|
||||
@@ -435,7 +435,7 @@ class LibraryPresenter(
|
||||
*
|
||||
* @return an observable of the categories.
|
||||
*/
|
||||
private fun getCategoriesObservable(): Flow<List<Category>> {
|
||||
private fun getCategoriesFlow(): Flow<List<Category>> {
|
||||
return getCategories.subscribe()
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ class LibraryPresenter(
|
||||
* @return an observable containing a map with the category id as key and a list of manga as the
|
||||
* value.
|
||||
*/
|
||||
private fun getLibraryMangasObservable(): Flow<LibraryMap> {
|
||||
private fun getLibraryMangasFlow(): Flow<LibraryMap> {
|
||||
return getLibraryManga.subscribe()
|
||||
.map { list ->
|
||||
list.map { libraryManga ->
|
||||
|
||||
Reference in New Issue
Block a user