New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NT-2000: Retrying posting a failed reply #1322
Conversation
@@ -339,7 +349,10 @@ interface CommentsViewHolderViewModel { | |||
* // TODO: we will need the entire comment plus very important the [parentId] | |||
* @return Observable<Comment> | |||
*/ | |||
private fun executePostCommentMutation(postCommentData: PostCommentData, errorObservable: BehaviorSubject<Throwable>) = | |||
private fun executePostCommentMutation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the TODO can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽
@@ -232,6 +234,7 @@ interface CommentsViewHolderViewModel { | |||
|
|||
comment | |||
.compose(takeWhen(this.onViewCommentRepliesButtonClicked)) | |||
.map { postedSuccessfully?.value ?: it } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the value for comment and postedSuccessFully should be the same. Why do we need to map here those two values? postedSuccessfully should be use only as a way of trigering the callback to the ThreadActivity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment that was emitted from the comment thread still had the default parentId of -1, which is why the reply was being treated as a root comment. Updating to use the comment item emitted from the postedSuccessfully stream gives us the updated parentId.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thanks for catching this. Just updated 👍🏽
Codecov Report
@@ Coverage Diff @@
## master #1322 +/- ##
=========================================
Coverage 74.12% 74.12%
Complexity 739 739
=========================================
Files 221 221
Lines 6666 6666
Branches 406 406
=========================================
Hits 4941 4941
Misses 1589 1589
Partials 136 136 Continue to review full report at Codecov.
|
8b7f00e
to
5c6ca10
Compare
📲 What
🛠 How
👀 See
retry.reply.comments.mp4
📋 QA
Reply on old root comment
Reply on new root comment
Story 📖
NT-2000: Retrying posting a failed reply