[Gekidou MM-48281] Fix issue with single image result extending to full height of the image (#6750)
This commit is contained in:
parent
57ae3bbc7b
commit
b078efe84f
3 changed files with 1 additions and 7 deletions
|
|
@ -25,7 +25,7 @@ type FileProps = {
|
|||
galleryIdentifier: string;
|
||||
index: number;
|
||||
inViewPort: boolean;
|
||||
isSingleImage: boolean;
|
||||
isSingleImage?: boolean;
|
||||
nonVisibleImagesCount: number;
|
||||
onPress: (index: number) => void;
|
||||
publicLinkEnabled: boolean;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ type Props = {
|
|||
channelName: string | undefined;
|
||||
fileInfo: FileInfo;
|
||||
index: number;
|
||||
isSingleImage: boolean;
|
||||
numOptions: number;
|
||||
onOptionsPress: (finfo: FileInfo) => void;
|
||||
onPress: (idx: number) => void;
|
||||
|
|
@ -41,7 +40,6 @@ const FileResult = ({
|
|||
channelName,
|
||||
fileInfo,
|
||||
index,
|
||||
isSingleImage,
|
||||
numOptions,
|
||||
onOptionsPress,
|
||||
onPress,
|
||||
|
|
@ -94,7 +92,6 @@ const FileResult = ({
|
|||
galleryIdentifier={galleryIdentifier}
|
||||
inViewPort={true}
|
||||
index={index}
|
||||
isSingleImage={isSingleImage}
|
||||
nonVisibleImagesCount={0}
|
||||
onOptionsPress={handleOptionsPress}
|
||||
onPress={onPress}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import {useImageAttachments} from '@app/hooks/files';
|
|||
import NoResultsWithTerm from '@components/no_results_with_term';
|
||||
import {useTheme} from '@context/theme';
|
||||
import {GalleryAction} from '@typings/screens/gallery';
|
||||
import {isImage, isVideo} from '@utils/file';
|
||||
import {
|
||||
getChannelNamesWithID,
|
||||
getFileInfosIndexes,
|
||||
|
|
@ -89,14 +88,12 @@ const FileResults = ({
|
|||
}, [insets, isTablet, numOptions, theme]);
|
||||
|
||||
const renderItem = useCallback(({item}: ListRenderItemInfo<FileInfo>) => {
|
||||
const isSingleImage = orderedFileInfos.length === 1 && (isImage(orderedFileInfos[0]) || isVideo(orderedFileInfos[0]));
|
||||
return (
|
||||
<FileResult
|
||||
canDownloadFiles={canDownloadFiles}
|
||||
channelName={channelNames[item.channel_id!]}
|
||||
fileInfo={item}
|
||||
index={fileInfosIndexes[item.id!] || 0}
|
||||
isSingleImage={isSingleImage}
|
||||
numOptions={numOptions}
|
||||
onOptionsPress={onOptionsPress}
|
||||
onPress={onPreviewPress}
|
||||
|
|
|
|||
Loading…
Reference in a new issue