From c4f22321b9d1e918754c801b6e636d5f3b964392 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Mon, 13 Jul 2020 15:01:07 -0300 Subject: [PATCH 1/2] Wrap video preview with ScrollView so Messagebox is shown properly --- app/views/ShareView/Preview.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/app/views/ShareView/Preview.js b/app/views/ShareView/Preview.js index fae6795354..2aaff22d84 100644 --- a/app/views/ShareView/Preview.js +++ b/app/views/ShareView/Preview.js @@ -10,12 +10,13 @@ import { ImageViewer, types } from '../../presentation/ImageViewer'; import { themes } from '../../constants/colors'; import { useDimensions, useOrientation } from '../../dimensions'; import { getHeaderHeight } from '../../containers/Header'; -import { isIOS } from '../../utils/deviceInfo'; import { THUMBS_HEIGHT } from './constants'; import sharedStyles from '../Styles'; import { allowPreview } from './utils'; import I18n from '../../i18n'; +const MESSAGEBOX_HEIGHT = 56; + const styles = StyleSheet.create({ fileContainer: { alignItems: 'center', @@ -58,23 +59,24 @@ const Preview = React.memo(({ const { isLandscape } = useOrientation(); const insets = useSafeAreaInsets(); const headerHeight = getHeaderHeight(isLandscape); - const messageboxHeight = isIOS ? 56 : 0; const thumbsHeight = (length > 1) ? THUMBS_HEIGHT : 0; - const calculatedHeight = height - insets.top - insets.bottom - messageboxHeight - thumbsHeight - headerHeight; + const calculatedHeight = height - insets.top - insets.bottom - MESSAGEBOX_HEIGHT - thumbsHeight - headerHeight; if (item?.canUpload) { if (type?.match(/video/)) { return ( -