Make sure that we reduce the unread message count when we delete an unread message#6746
Merged
Conversation
nickmurray47
left a comment
Contributor
There was a problem hiding this comment.
Tests well and lgtm minus one linting change
Comment on lines
+543
to
+545
| if (!message.text) { | ||
| setLocalLastRead(reportID, lastReadSequenceNumbers[reportID]); | ||
| } |
Contributor
There was a problem hiding this comment.
is this what the linter is looking for?
Suggested change
| if (!message.text) { | |
| setLocalLastRead(reportID, lastReadSequenceNumbers[reportID]); | |
| } | |
| if (message.text) { | |
| return; | |
| } | |
| setLocalLastRead(reportID, lastReadSequenceNumbers[reportID]); |
parasharrajat
suggested changes
Dec 14, 2021
| Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, actionToMerge); | ||
| Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, actionToMerge).then(() => { | ||
| // If the message is deleted, update the last read in case the deleted message is being counted in the unreadActionCount | ||
| if (!message.text) { |
Member
There was a problem hiding this comment.
You should check html instead of text just to be consistent across app.
Contributor
Author
|
Updated! |
nickmurray47
approved these changes
Dec 14, 2021
nickmurray47
left a comment
Contributor
There was a problem hiding this comment.
nice 👍 will leave this for Jules to final approve/merge
parasharrajat
approved these changes
Dec 14, 2021
Julesssss
approved these changes
Dec 14, 2021
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
37 tasks
Contributor
|
🚀 Deployed to staging by @Julesssss in version: 1.1.20-3 🚀
|
Contributor
|
🚀 Deployed to production by @Julesssss in version: 1.1.21-1 🚀
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@Julesssss please review
cc @parasharrajat
Details
This will call
setLocalLastReadwhen we see that the message being updated is getting deleted. Also a small change to make a variable name a bit clearer.Fixed Issues
$ #6472
Tests/QA
Video:
https://user-images.githubusercontent.com/4741899/145924224-69ac2239-bc67-495c-84db-5b2e8539d62f.mp4
1Video:
https://user-images.githubusercontent.com/4741899/145924341-b8f5ea80-1e36-40e5-a832-f1360098e334.mp4
1Video:
https://user-images.githubusercontent.com/4741899/145924454-2dc772b3-0dcd-4e90-b759-b1eb6c7dc48e.mp4