Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion app/containers/MessageBox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ class MessageBox extends Component {
return (
<>
{commandsPreviewAndMentions}
<View style={[styles.composer, { borderTopColor: themes[theme].separatorColor }]}>
<View style={[styles.composer, { borderTopColor: themes[theme].borderColor }]}>
{replyPreview}
<View
style={[
Expand Down
28 changes: 15 additions & 13 deletions app/views/ShareView/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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 (
<Video
source={{ uri: item.path }}
rate={1.0}
volume={1.0}
isMuted={false}
resizeMode={Video.RESIZE_MODE_CONTAIN}
isLooping={false}
style={{ width, height: calculatedHeight }}
useNativeControls
/>
<ScrollView style={{ height: calculatedHeight }}>
<Video
source={{ uri: item.path }}
rate={1.0}
volume={1.0}
isMuted={false}
resizeMode={Video.RESIZE_MODE_CONTAIN}
isLooping={false}
style={{ width, height: calculatedHeight }}
useNativeControls
/>
</ScrollView>
);
}

Expand Down