We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74bd26e commit 1948d6aCopy full SHA for 1948d6a
data/src/main/java/com/whyranoid/data/Post/PostDataSource.kt
@@ -1,6 +1,7 @@
1
package com.whyranoid.data.Post
2
3
import com.google.firebase.firestore.FirebaseFirestore
4
+import com.google.firebase.firestore.Query
5
import com.whyranoid.data.constant.CollectionId
6
import com.whyranoid.data.model.GroupInfoResponse
7
import com.whyranoid.data.model.RecruitPostResponse
@@ -26,6 +27,7 @@ class PostDataSource @Inject constructor(
26
27
fun getAllPostFlow(): Flow<List<Post>> =
28
callbackFlow {
29
db.collection(CollectionId.POST_COLLECTION)
30
+ .orderBy("updatedAt", Query.Direction.DESCENDING)
31
.addSnapshotListener { snapshot, _ ->
32
val recruitPostList = mutableListOf<Post>()
33
snapshot?.forEach { docuemnt ->
0 commit comments