-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: Room - Create room whisper reappears when interacting with it after workspace is deleted. #50692
Changes from 21 commits
beb006f
921f474
597e243
352abf8
534c19e
9a9ba02
176872b
e602e69
7b32415
16ca72b
95bec1f
0ac8933
5fb1937
4016e70
47735bf
edf7c52
2bd8fe5
ea27cc3
40b7435
606d8ad
c870f75
dfdfb19
2aacbe8
0e1da04
676c822
af332d7
ed6c4ff
a360422
68d8fd6
7d32b41
716c953
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 = ReportUtils.getReport(reportIDWithDefault); | ||||||
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.
Suggested change
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.
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.
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. Sorry my mistake, now updated. |
||||||
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}`); | ||||||
|
||||||
|
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.