【发布时间】:2020-04-16 15:37:21
【问题描述】:
在我的应用程序中,用户可以喜欢某些帖子。他们的点赞会以这种方式存储。
数据库图片:
基本上:在集合 Posts -> postID -> 集合 Likes -> userID -> timestamp。我想要得到的是 userIds 在所有帖子的 Likes 集合中的数量。基本上我想在我的 Recycler Adapter 中首先显示点赞数最高的帖子数。
我相信我正在寻找可以帮助我获得 currentUserIds 数量的类型的查询,然后在我的适配器中按降序显示它们:
Query firstQuery = firebaseFirestore.collection("Likes").document(currentUserId)...
【问题讨论】:
标签: java android firebase google-cloud-firestore