diff --git a/app/containers/message/Components/BlurComponent.tsx b/app/containers/message/Components/BlurComponent.tsx deleted file mode 100644 index 2f430ed17..000000000 --- a/app/containers/message/Components/BlurComponent.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { BlurView } from '@react-native-community/blur'; -import { View, ViewStyle } from 'react-native'; - -import RCActivityIndicator from '../../ActivityIndicator'; -import { CustomIcon } from '../../CustomIcon'; -import { useTheme } from '../../../theme'; - -const BlurComponent = ({ loading = false, style }: { loading: boolean; style: ViewStyle }) => { - const { theme, colors } = useTheme(); - - return ( - <> - - - {loading ? : } - - - ); -}; - -export default BlurComponent; diff --git a/app/containers/message/Image.tsx b/app/containers/message/Image.tsx index 1bbf55753..127e59ff0 100644 --- a/app/containers/message/Image.tsx +++ b/app/containers/message/Image.tsx @@ -5,6 +5,7 @@ import { dequal } from 'dequal'; import { createImageProgress } from 'react-native-image-progress'; import * as Progress from 'react-native-progress'; import * as FileSystem from 'expo-file-system'; +import { BlurView } from '@react-native-community/blur'; import Touchable from './Touchable'; import Markdown from '../markdown'; @@ -17,7 +18,8 @@ import { TSupportedThemes, useTheme } from '../../theme'; import { formatAttachmentUrl } from '../../lib/methods/helpers/formatAttachmentUrl'; import { MediaTypes, downloadMediaFile, searchMediaFileAsync } from '../../lib/methods/handleMediaDownload'; import { isAutoDownloadEnabled } from './helpers/mediaDownload/autoDownloadPreference'; -import BlurComponent from './Components/BlurComponent'; +import RCActivityIndicator from '../ActivityIndicator'; +import { CustomIcon } from '../CustomIcon'; interface IMessageButton { children: React.ReactElement; @@ -50,6 +52,24 @@ const Button = React.memo(({ children, onPress, disabled, theme }: IMessageButto )); +const BlurComponent = ({ loading = false }: { loading: boolean }) => { + const { theme, colors } = useTheme(); + + return ( + <> + + + {loading ? : } + + + ); +}; + export const MessageImage = React.memo( ({ imgUri, toDownload, loading }: { imgUri: string; toDownload: boolean; loading: boolean }) => { const { colors } = useTheme(); @@ -65,7 +85,7 @@ export const MessageImage = React.memo( color: colors.actionTintColor }} /> - {toDownload ? : null} + {toDownload ? : null} ); } diff --git a/app/containers/message/Video.tsx b/app/containers/message/Video.tsx index a5facee29..b7e8d796c 100644 --- a/app/containers/message/Video.tsx +++ b/app/containers/message/Video.tsx @@ -151,7 +151,7 @@ const Video = React.memo( } if (!isIOS && file.video_url) { - await downloadVideo(video); + await downloadVideoToGallery(video); return; } EventEmitter.emit(LISTENER, { message: I18n.t('Unsupported_format') }); @@ -165,7 +165,7 @@ const Video = React.memo( } }; - const downloadVideo = async (uri: string) => { + const downloadVideoToGallery = async (uri: string) => { setLoading(true); const fileDownloaded = await fileDownload(uri, file); setLoading(false); diff --git a/app/containers/message/styles.ts b/app/containers/message/styles.ts index 8987ca2f1..d0295c354 100644 --- a/app/containers/message/styles.ts +++ b/app/containers/message/styles.ts @@ -170,5 +170,19 @@ export default StyleSheet.create({ threadDetails: { flex: 1, marginLeft: 12 + }, + imageBlur: { + position: 'absolute', + borderWidth: 0, + top: 0, + left: 0, + bottom: 0, + right: 0 + }, + imageIndicator: { + position: 'absolute', + justifyContent: 'center', + alignItems: 'center', + borderWidth: 0 } }); diff --git a/ios/.xcode.env.local b/ios/.xcode.env.local deleted file mode 100644 index f27b2ce57..000000000 --- a/ios/.xcode.env.local +++ /dev/null @@ -1 +0,0 @@ -export NODE_BINARY="/Users/reinaldoneto/.nvm/versions/node/v14.19.3/bin/node"