From 4f9f8fc4696e5e17b3688d509c237138fb1bff99 Mon Sep 17 00:00:00 2001 From: Gerard Paligot Date: Wed, 8 Nov 2023 13:43:16 +0100 Subject: [PATCH 1/2] fix(openfeedback): ordering comments by date creation. --- .../io/openfeedback/android/sources/OpenFeedbackFirestore.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/openfeedback/src/main/java/io/openfeedback/android/sources/OpenFeedbackFirestore.kt b/openfeedback/src/main/java/io/openfeedback/android/sources/OpenFeedbackFirestore.kt index 14915a5..881d9f5 100644 --- a/openfeedback/src/main/java/io/openfeedback/android/sources/OpenFeedbackFirestore.kt +++ b/openfeedback/src/main/java/io/openfeedback/android/sources/OpenFeedbackFirestore.kt @@ -64,6 +64,7 @@ class OpenFeedbackFirestore( } } ?.flatten() + ?.sortedBy { it.second.createdAt } ?.associate { it.first to it.second } ?: emptyMap() ) From 9ea90ec4bbd9ddfa802b174f2ff1118dc7eb0bf7 Mon Sep 17 00:00:00 2001 From: Gerard Paligot Date: Wed, 8 Nov 2023 13:57:30 +0100 Subject: [PATCH 2/2] fix(openfeedback): use voteId instead of voteItemId for upVotes in local. --- .../main/java/io/openfeedback/android/OpenFeedbackRepository.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfeedback/src/main/java/io/openfeedback/android/OpenFeedbackRepository.kt b/openfeedback/src/main/java/io/openfeedback/android/OpenFeedbackRepository.kt index 097be63..cac83ce 100644 --- a/openfeedback/src/main/java/io/openfeedback/android/OpenFeedbackRepository.kt +++ b/openfeedback/src/main/java/io/openfeedback/android/OpenFeedbackRepository.kt @@ -61,7 +61,7 @@ class OpenFeedbackRepository( status: VoteStatus ) { auth.withFirebaseUser { - optimisticVoteCaching.updateCommentVote(voteItemId, status) + optimisticVoteCaching.updateCommentVote(voteId, status) firestore.upVote(projectId, it.uid, talkId, voteItemId, voteId, status) } }