-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: Room - Create room whisper reappears when interacting with it after workspace is deleted. #50692
Merged
Merged
fix: Room - Create room whisper reappears when interacting with it after workspace is deleted. #50692
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
beb006f
fix: Room - Create room whisper reappears when interacting with it af…
Krishna2323 921f474
fix lint issues.
Krishna2323 597e243
minor update.
Krishna2323 352abf8
minor update.
Krishna2323 534c19e
fix lint issue.
Krishna2323 9a9ba02
Merge branch 'Expensify:main' into krishna2323/issue/49940
Krishna2323 176872b
Merge branch 'main' into krishna2323/issue/49940
Krishna2323 e602e69
pass 'canUserPerformWriteAction' to shouldReportActionBeVisible.
Krishna2323 7b32415
fix tests.
Krishna2323 16ca72b
fix: Unchanged files with check annotations.
Krishna2323 95bec1f
minor fixes.
Krishna2323 0ac8933
fix: TypeScript Checks.
Krishna2323 5fb1937
fix: TypeScript Checks.
Krishna2323 4016e70
Merge branch 'Expensify:main' into krishna2323/issue/49940
Krishna2323 47735bf
Merge branch 'Expensify:main' into krishna2323/issue/49940
Krishna2323 edf7c52
remove reportID parameter from shouldReportActionBeVisible.
Krishna2323 2bd8fe5
Merge branch 'Expensify:main' into krishna2323/issue/49940
Krishna2323 ea27cc3
remove redundant code.
Krishna2323 40b7435
minor update.
Krishna2323 606d8ad
Merge branch 'main' into krishna2323/issue/49940
Krishna2323 c870f75
minor update.
Krishna2323 dfdfb19
minor fix.
Krishna2323 2aacbe8
Merge branch 'Expensify:main' into krishna2323/issue/49940
Krishna2323 0e1da04
add tests for ReportActionsUtils.getSortedReportActionsForDisplay.
Krishna2323 676c822
fix unit tests.
Krishna2323 af332d7
minor update.
Krishna2323 ed6c4ff
fix tests.
Krishna2323 a360422
update test input data and comments.
Krishna2323 68d8fd6
update comments and input data.
Krishna2323 7d32b41
minor update.
Krishna2323 716c953
remove 'eslint-disable-next-line' comment.
Krishna2323 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ import {useMemo} from 'react'; | |
import {useOnyx} from 'react-native-onyx'; | ||
import PaginationUtils from '@libs/PaginationUtils'; | ||
import * as ReportActionsUtils from '@libs/ReportActionsUtils'; | ||
import * as ReportUtils from '@libs/ReportUtils'; | ||
import ONYXKEYS from '@src/ONYXKEYS'; | ||
|
||
/** | ||
|
@@ -11,10 +12,12 @@ function usePaginatedReportActions(reportID?: string, reportActionID?: string) { | |
// Use `||` instead of `??` to handle empty string. | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
const reportIDWithDefault = reportID || '-1'; | ||
const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`); | ||
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. FYI, we need to use |
||
const canUserPerformWriteAction = ReportUtils.canUserPerformWriteAction(report); | ||
|
||
const [sortedAllReportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportIDWithDefault}`, { | ||
canEvict: false, | ||
selector: (allReportActions) => ReportActionsUtils.getSortedReportActionsForDisplay(allReportActions, true), | ||
selector: (allReportActions) => ReportActionsUtils.getSortedReportActionsForDisplay(allReportActions, canUserPerformWriteAction, true), | ||
}); | ||
const [reportActionPages] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_PAGES}${reportIDWithDefault}`); | ||
|
||
|
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.
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.
extractAttachments
is a util function so we can't useuseOnyx
here.