Migrate Source Filter Screen to Compose (#7031)

* Migrate Source Filter Screen to Compose

* Changes from Review and some more fixes

* Rename some variable and classes

* Review Change

* Ewbase and Review changes
This commit is contained in:
FourTOne5
2022-04-30 08:49:02 -07:00
committed by GitHub
parent cccd09fb5c
commit 23f8f35354
14 changed files with 324 additions and 123 deletions

View File

@@ -19,6 +19,12 @@ class SourceRepositoryImpl(
}
}
override fun getOnlineSources(): Flow<List<Source>> {
return sourceManager.onlineSources.map { sources ->
sources.map(sourceMapper)
}
}
override fun getSourcesWithFavoriteCount(): Flow<List<Pair<Source, Long>>> {
val sourceIdWithFavoriteCount = handler.subscribeToList { mangasQueries.getSourceIdWithFavoriteCount() }
return sourceIdWithFavoriteCount.map { sourceIdsWithCount ->