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) } } 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() )