diff --git a/src/CONST.ts b/src/CONST.ts index 9efab1de506b..77b97c7ac904 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1869,6 +1869,7 @@ const CONST = { XVND8: 'video/x-vnd.on2.vp8', XVND9: 'video/x-vnd.on2.vp9', AV01: 'video/av01', + VIDEO: 'video/*', TXT: 'txt', }, diff --git a/src/pages/Share/ShareDetailsPage.tsx b/src/pages/Share/ShareDetailsPage.tsx index 03ed527d5d58..620b98bab927 100644 --- a/src/pages/Share/ShareDetailsPage.tsx +++ b/src/pages/Share/ShareDetailsPage.tsx @@ -6,8 +6,10 @@ import type {OnyxEntry} from 'react-native-onyx'; import AttachmentModal from '@components/AttachmentModal'; import AttachmentPreview from '@components/AttachmentPreview'; import Button from '@components/Button'; +import FixedFooter from '@components/FixedFooter'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import {FallbackAvatar} from '@components/Icon/Expensicons'; +import {PressableWithoutFeedback} from '@components/Pressable'; import ScreenWrapper from '@components/ScreenWrapper'; import ScrollView from '@components/ScrollView'; import Text from '@components/Text'; @@ -28,6 +30,7 @@ import ROUTES from '@src/ROUTES'; import type SCREENS from '@src/SCREENS'; import type {Report as ReportType} from '@src/types/onyx'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; +import KeyboardUtils from '@src/utils/keyboard'; import {showErrorAlert} from './ShareRootPage'; type ShareDetailsPageProps = StackScreenProps; @@ -46,6 +49,7 @@ function ShareDetailsPage({ const report: OnyxEntry = getReportOrDraftReport(reportOrAccountID); const displayReport = useMemo(() => getReportDisplayOption(report, unknownUserDetails), [report, unknownUserDetails]); + if (isEmptyObject(report)) { return ; } @@ -96,85 +100,95 @@ function ShareDetailsPage({ }; return ( - { + KeyboardUtils.dismiss(); + }} + accessible={false} > - - - {!!report && ( - <> - - {translate('common.to')} - - {}} - pressableStyle={[styles.flexRow]} - shouldSyncFocus={false} - isDisabled - /> - - )} + + + - - - - - - - {shouldShowAttachment && ( - <> - - {translate('common.attachment')} + {!!report && ( + + + {translate('common.to')} - - - {({show}) => ( - { - showErrorAlert(translate('attachmentPicker.attachmentError'), translate('attachmentPicker.errorWhileSelectingCorruptedAttachment')); - }} - /> - )} - - - + { + KeyboardUtils.dismiss(); + }} + pressableStyle={[styles.flexRow]} + shouldSyncFocus={false} + /> + )} - - + + + + + + + {shouldShowAttachment && ( + <> + + {translate('common.attachment')} + + + + {({show}) => ( + { + showErrorAlert(translate('attachmentPicker.attachmentError'), translate('attachmentPicker.errorWhileSelectingCorruptedAttachment')); + }} + /> + )} + + + + )} + + +