Cleanup Library after Compose changes (#7584)

This commit is contained in:
Andreas
2022-07-23 15:58:05 +02:00
committed by GitHub
parent fc328e141c
commit 9f2ddaadde
7 changed files with 35 additions and 59 deletions

View File

@@ -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 ->