Skip to content

Commit

Permalink
Use custom equivalent check for home screen posts list
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Apr 25, 2024
1 parent f5dae2c commit 86a2cdf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ class HomePresenter(
)
.map { featuredPosts -> Triple(activeSource, postsType, featuredPosts) }
}
.distinctUntilChanged()
.distinctUntilChanged { old, new ->
old.third.map { it.id } == new.third.map { it.id } ||
old.first == new.first ||
old.second == new.second
}
.onEach { (activeSource, postsType, featuredPosts) ->
val featuredPostIds = featuredPosts.map { it.id }

Expand Down

0 comments on commit 86a2cdf

Please sign in to comment.