From 53ed61df39e7c274f703e6dcadd071e1c4306b2a Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Tue, 4 Jul 2023 00:54:25 -0300 Subject: [PATCH] add Audio to i18n and minor tweak --- app/containers/message/Image.tsx | 4 ++-- app/containers/message/Video.tsx | 9 ++++----- app/i18n/locales/en.json | 3 ++- app/i18n/locales/pt-BR.json | 3 ++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/containers/message/Image.tsx b/app/containers/message/Image.tsx index eb573bdc9..9e049989b 100644 --- a/app/containers/message/Image.tsx +++ b/app/containers/message/Image.tsx @@ -127,10 +127,10 @@ const ImageContainer = React.memo( title_link: imageUri })); setCached(true); - setLoading(false); } catch (e) { - setLoading(false); setCached(false); + } finally { + setLoading(false); } }; diff --git a/app/containers/message/Video.tsx b/app/containers/message/Video.tsx index 4735e54cf..1d5916096 100644 --- a/app/containers/message/Video.tsx +++ b/app/containers/message/Video.tsx @@ -119,18 +119,15 @@ const Video = React.memo( ...prev, video_url: cachedVideoResult.file?.uri })); - setCached(true); setLoading(false); + setCached(true); if (downloadActive) { cancelDownload(video); } return; } - if (downloadActive && !isReply) { - return; - } - setLoading(false); if (isReply) { + setLoading(false); return; } await handleAutoDownload(); @@ -162,6 +159,8 @@ const Video = React.memo( video_url: videoUri })); setCached(true); + } catch { + setCached(false); } finally { setLoading(false); } diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index ab7abad23..88fa29ba1 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -730,5 +730,6 @@ "Video": "Video", "Wi_Fi_and_mobile_data":"Wi-Fi and mobile data", "Wi_Fi": "Wi-Fi", - "Off": "Off" + "Off": "Off", + "Audio": "Audio" } \ No newline at end of file diff --git a/app/i18n/locales/pt-BR.json b/app/i18n/locales/pt-BR.json index 357d1ce03..49560a2f5 100644 --- a/app/i18n/locales/pt-BR.json +++ b/app/i18n/locales/pt-BR.json @@ -718,5 +718,6 @@ "Video": "Vídeo", "Wi_Fi_and_mobile_data":"Wi-Fi e dados móveis", "Wi_Fi": "Wi-Fi", - "Off": "Desativado" + "Off": "Desativado", + "Audio": "Áudio" } \ No newline at end of file