-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix: Regression - Emoji reaction not working - Issue 22235 (Original - 21826) #22270
Merged
neil-marcellini
merged 30 commits into
Expensify:main
from
jeet-dhandha:regression-fix-21826
Jul 20, 2023
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
fd300e2
fix: Changes
jeet-dhandha 06f9bbc
Revert "fix: Changes"
jeet-dhandha 4839b98
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 9aaae8a
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 4ba0164
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 86f7d3a
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 1a1ef11
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 93b92ae
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 9ae6e80
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 3cd7964
Merge remote-tracking branch 'upstream/main'
jeet-dhandha c9474fd
Merge remote-tracking branch 'upstream/main'
jeet-dhandha fd41eb4
Merge remote-tracking branch 'upstream/main'
jeet-dhandha d126def
fix-regression
jeet-dhandha ae07063
fix: report action name changes
jeet-dhandha fcbdd8c
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 5eeeb95
Merge remote-tracking branch 'upstream/main'
jeet-dhandha cc1bb9c
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 1fa3623
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 39737ca
Merge remote-tracking branch 'upstream/main'
jeet-dhandha ccb128f
Merge branch 'main' into regression-fix-21826
jeet-dhandha 9634040
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 5162f9a
Merge branch 'main' into regression-fix-21826
jeet-dhandha 461b766
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 5f7fb5c
Merge remote-tracking branch 'upstream/main'
jeet-dhandha a5cbaad
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 670ecfc
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 30d615f
Merge remote-tracking branch 'upstream/main'
jeet-dhandha 653c0f7
Merge branch 'main' into regression-fix-21826
jeet-dhandha db668d3
chore: use reportId from reportAction
jeet-dhandha 229a5d3
chore: change jsdoc type
jeet-dhandha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1635,13 +1635,14 @@ function removeEmojiReaction(reportID, originalReportAction, emoji) { | |
/** | ||
* Calls either addEmojiReaction or removeEmojiReaction depending on if the current user has reacted to the report action. | ||
* @param {String} reportID | ||
* @param {String} reportActionID | ||
* @param {Object} action | ||
* @param {Object} emoji | ||
* @param {number} paramSkinTone | ||
* @returns {Promise} | ||
*/ | ||
function toggleEmojiReaction(reportID, reportActionID, emoji, paramSkinTone = preferredSkinTone) { | ||
const reportAction = ReportActionsUtils.getReportAction(reportID, reportActionID); | ||
function toggleEmojiReaction(reportID, action, emoji, paramSkinTone = preferredSkinTone) { | ||
const originalReportID = ReportUtils.getOriginalReportID(reportID, action); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As original reportID is already calculated here, let's remove redundant calculation in addEmojiReaction and removeEmojiReaction |
||
const reportAction = ReportActionsUtils.getReportAction(originalReportID, action.reportActionID); | ||
|
||
if (_.isEmpty(reportAction)) { | ||
return; | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Let's re-use name from original code so replace all
action
withreportAction
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.
But this will give conflicts with the const created inside.
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.
@aimane-chnaif