Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/pages/home/report/ReportActionItemMessageEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import type {TextSelection} from '@components/Composer/types';
import EmojiPickerButton from '@components/EmojiPicker/EmojiPickerButton';
import ExceededCommentLength from '@components/ExceededCommentLength';
import Icon from '@components/Icon';
import * as Expensicons from '@components/Icon/Expensicons';
import PressableWithFeedback from '@components/Pressable/PressableWithFeedback';
import Tooltip from '@components/Tooltip';
import useAncestors from '@hooks/useAncestors';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useHandleExceedMaxCommentLength from '@hooks/useHandleExceedMaxCommentLength';
import useIsScrollLikelyLayoutTriggered from '@hooks/useIsScrollLikelyLayoutTriggered';
import useKeyboardState from '@hooks/useKeyboardState';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import usePrevious from '@hooks/usePrevious';
Expand Down Expand Up @@ -155,6 +155,7 @@ function ReportActionItemMessageEdit({
const originalParentReportID = getOriginalReportID(originalReportID, action);
const isOriginalParentReportArchived = useReportIsArchived(originalParentReportID);
const ancestors = useAncestors(originalReport);
const icons = useMemoizedLazyExpensifyIcons(['Checkmark', 'Close']);

useEffect(() => {
draftMessageVideoAttributeCache.clear();
Expand Down Expand Up @@ -510,7 +511,7 @@ function ReportActionItemMessageEdit({
>
<Icon
fill={theme.icon}
src={Expensicons.Close}
src={icons.Close}
/>
</PressableWithFeedback>
</Tooltip>
Expand All @@ -527,6 +528,7 @@ function ReportActionItemMessageEdit({
ref.current = el;
}
}}
autoFocus={!shouldUseNarrowLayout}
onChangeText={updateDraft} // Debounced saveDraftComment
onKeyPress={triggerSaveOrCancel}
value={draft}
Expand Down Expand Up @@ -626,7 +628,7 @@ function ReportActionItemMessageEdit({
sentryLabel={CONST.SENTRY_LABEL.REPORT.REPORT_ACTION_ITEM_MESSAGE_EDIT_SAVE_BUTTON}
>
<Icon
src={Expensicons.Checkmark}
src={icons.Checkmark}
fill={hasExceededMaxCommentLength ? theme.icon : theme.textLight}
/>
</PressableWithFeedback>
Expand Down