Skip to content

Commit

Permalink
Merge pull request #47949 from FitseTLT/fix-mention-list-on-message-edit
Browse files Browse the repository at this point in the history
Fix - Room - Rooms mention list does not appear in message edit mode
  • Loading branch information
jasperhuangg authored Sep 6, 2024
2 parents 06c76c9 + 8ce3dbc commit e0e7bc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ function ReportActionItem({
action={action}
draftMessage={draftMessage}
reportID={report.reportID}
policyID={report.policyID}
index={index}
ref={textInputRef}
shouldDisableEmojiPicker={
Expand Down
10 changes: 7 additions & 3 deletions src/pages/home/report/ReportActionItemMessageEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ type ReportActionItemMessageEditProps = {
/** ReportID that holds the comment we're editing */
reportID: string;

/** PolicyID of the policy the report belongs to */
policyID?: string;

/** Position index of the report action in the overall report FlatList view */
index: number;

/** Whether or not the emoji picker is disabled */
shouldDisableEmojiPicker?: boolean;

/** Whether report is from group policy */
isGroupPolicyReport?: boolean;
isGroupPolicyReport: boolean;
};

// native ids
Expand All @@ -81,7 +84,7 @@ const shouldUseForcedSelectionRange = shouldUseEmojiPickerSelection();
const draftMessageVideoAttributeCache = new Map<string, string>();

function ReportActionItemMessageEdit(
{action, draftMessage, reportID, index, isGroupPolicyReport, shouldDisableEmojiPicker = false}: ReportActionItemMessageEditProps,
{action, draftMessage, reportID, policyID, index, isGroupPolicyReport, shouldDisableEmojiPicker = false}: ReportActionItemMessageEditProps,
forwardedRef: ForwardedRef<TextInput | HTMLTextAreaElement | undefined>,
) {
const [preferredSkinTone] = useOnyx(ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE, {initialValue: CONST.EMOJI_DEFAULT_SKIN_TONE});
Expand Down Expand Up @@ -532,7 +535,8 @@ function ReportActionItemMessageEdit(
isComposerFocused={textInputRef.current?.isFocused()}
updateComment={updateDraft}
measureParentContainerAndReportCursor={measureParentContainerAndReportCursor}
isGroupPolicyReport={false}
isGroupPolicyReport={isGroupPolicyReport}
policyID={policyID}
value={draft}
selection={selection}
setSelection={setSelection}
Expand Down

0 comments on commit e0e7bc8

Please sign in to comment.