mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 01:47:03 +05:30
fix(android): sort saved posts in view model
This commit is contained in:
parent
61a72b330d
commit
91bf5e5555
1 changed files with 4 additions and 1 deletions
|
@ -86,7 +86,10 @@ constructor(
|
||||||
get() = newestPostsPager.flow
|
get() = newestPostsPager.flow
|
||||||
|
|
||||||
val savedPosts
|
val savedPosts
|
||||||
get() = savedPostsRepository.savedPosts
|
get() =
|
||||||
|
savedPostsRepository.savedPosts.map {
|
||||||
|
it.sortedByDescending { post -> post.createdAt.toLocalDateTime() }
|
||||||
|
}
|
||||||
|
|
||||||
val savedPostsByMonth
|
val savedPostsByMonth
|
||||||
get() = savedPosts.map(::mapSavedPosts)
|
get() = savedPosts.map(::mapSavedPosts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue