Skip to content

Commit cd0f980

Browse files
committed
add isGroupPolicyReport prop
1 parent c95b4aa commit cd0f980

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/pages/home/report/ReportActionCompose/ComposerWithSuggestionsEdit/ComposerWithSuggestionsEdit.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ type ComposerWithSuggestionsEditProps = ComposerProps & {
2121
measureParentContainer: (callback: MeasureInWindowOnSuccessCallback) => void;
2222
value: string;
2323
selection: Selection;
24+
isGroupPolicyReport: boolean;
2425
};
2526

2627
function ComposerWithSuggestionsEdit(
@@ -45,6 +46,7 @@ function ComposerWithSuggestionsEdit(
4546
updateDraft,
4647
measureParentContainer,
4748
id = undefined,
49+
isGroupPolicyReport,
4850
}: ComposerWithSuggestionsEditProps,
4951
ref: ForwardedRef<TextInput>,
5052
) {
@@ -87,6 +89,7 @@ function ComposerWithSuggestionsEdit(
8789
selection={selection}
8890
setSelection={setSelection}
8991
resetKeyboardInput={resetKeyboardInput}
92+
isGroupPolicyReport={isGroupPolicyReport}
9093
/>
9194
</>
9295
);

src/pages/home/report/ReportActionItem.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ function ReportActionItem({
626626
action={action}
627627
draftMessage={draftMessage}
628628
reportID={report.reportID}
629+
isGroupChatPolicy={ReportUtils.isGroupPolicy(report)}
629630
index={index}
630631
ref={textInputRef}
631632
// Avoid defining within component due to an existing Onyx bug

src/pages/home/report/ReportActionItemMessageEdit.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ type ReportActionItemMessageEditProps = {
5959
/** ReportID that holds the comment we're editing */
6060
reportID: string;
6161

62+
/** If current composer is connected with report from group policy */
63+
isGroupPolicyReport: boolean;
64+
6265
/** Position index of the report action in the overall report FlatList view */
6366
index: number;
6467

@@ -77,7 +80,7 @@ const isMobileSafari = Browser.isMobileSafari();
7780
const shouldUseForcedSelectionRange = shouldUseEmojiPickerSelection();
7881

7982
function ReportActionItemMessageEdit(
80-
{action, draftMessage, reportID, index, shouldDisableEmojiPicker = false, preferredSkinTone = CONST.EMOJI_DEFAULT_SKIN_TONE}: ReportActionItemMessageEditProps,
83+
{action, draftMessage, reportID, isGroupPolicyReport, index, shouldDisableEmojiPicker = false, preferredSkinTone = CONST.EMOJI_DEFAULT_SKIN_TONE}: ReportActionItemMessageEditProps,
8184
forwardedRef: ForwardedRef<(TextInput & HTMLTextAreaElement) | undefined>,
8285
) {
8386
const theme = useTheme();
@@ -526,6 +529,7 @@ function ReportActionItemMessageEdit(
526529
suggestionsRef={suggestionsRef}
527530
updateDraft={updateDraft}
528531
measureParentContainer={measureContainer}
532+
isGroupPolicyReport={isGroupPolicyReport}
529533
/>
530534
</View>
531535
<View style={styles.editChatItemEmojiWrapper}>

0 commit comments

Comments
 (0)