Skip to content

Commit

Permalink
chore: change articles on home to latest articles
Browse files Browse the repository at this point in the history
  • Loading branch information
Boreneoux committed Jul 15, 2024
1 parent bbad633 commit 84614e2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ArticleRepository @Inject constructor(

fun getArticlesHome(): Flow<List<BookmarkableArticle>> = articleDao.getAllArticleBookmark()
.combine(networkArticles) { bookmarkedArticles, networkArticles ->
networkArticles.take(3)
networkArticles.takeLast(3)
.map { networkArticle ->
networkArticle.copy(isBookmarked = bookmarkedArticles.any { it.articleId == networkArticle.articleId })
}
Expand Down

0 comments on commit 84614e2

Please sign in to comment.