Commit 788778b9 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

fixed

parent 103bc906
......@@ -89,7 +89,6 @@ class ArticlesScreenController :
lateinit var emptyListNotice: MaterialTextView
private fun setToolbar() {
articlesRecyclerView.isNestedScrollingEnabled = false
......
......@@ -54,18 +54,18 @@ class ArticlesScreenPresenter @Inject constructor(
}
val fetchSubscription = interactor.getSubscriptions(feedId)
.doOnNext { Timber.w("got smthng: $it") }
.doAfterNext { restoreModel.sub = it }
.map<ArticlesScreenViewState> { ArticlesScreenViewState.SubscriptionStatus(it.state) }
.startWith(Observable.just<ArticlesScreenViewState>(ArticlesScreenViewState.Idle()))
val prefetchCards = interactor.fetchArticles(feedId)
.doOnNext { restoreModel.articles.addAll(it.articles) }
.map<ArticlesScreenViewState> { ArticlesScreenViewState.ArticlesLoaded(it.articles) }
.startWith(Observable.just<ArticlesScreenViewState>(ArticlesScreenViewState.Idle()))
val getNewArticlesPage = intent(ArticlesScreen::requsetsNewArticles)
.flatMap {
interactor.fetchArticlesPage(feedId, FEED_PAGE_SIZE, it)
.flatMap {currentItem ->
interactor.fetchArticlesPage(feedId, FEED_PAGE_SIZE, currentItem)
.map<ArticlesScreenViewState> { articlePage ->
articlePage.articles
.asSequence()
......
......@@ -18,3 +18,4 @@ sealed class ArticlesScreenViewState : BigantoBaseViewState() {
class SubscriptionStatus(val subState: Boolean) : ArticlesScreenViewState()
class SubscriptionError(val subState: Boolean) : ArticlesScreenViewState()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment