Skip to content

Commit

Permalink
Fix home screen not updating when posts type filter is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Apr 25, 2024
1 parent aa9471b commit f5dae2c
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,16 @@ class HomePresenter(
}
}

rssRepository.featuredPosts(
selectedFeedId = activeSource?.id,
unreadOnly = unreadOnly,
after = postsAfter
)
rssRepository
.featuredPosts(
selectedFeedId = activeSource?.id,
unreadOnly = unreadOnly,
after = postsAfter
)
.map { featuredPosts -> Triple(activeSource, postsType, featuredPosts) }
}
.distinctUntilChanged()
.onEach { featuredPosts ->
val postsType = _state.value.postsType
val activeSource = _state.value.activeSource
.onEach { (activeSource, postsType, featuredPosts) ->
val featuredPostIds = featuredPosts.map { it.id }

val unreadOnly =
Expand Down

0 comments on commit f5dae2c

Please sign in to comment.