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
5 changes: 5 additions & 0 deletions assets/images/arrow-circle-clockwise.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion src/components/Attachments/AttachmentView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import type {GestureResponderEvent, ImageURISource, StyleProp, ViewStyle} from '
import {View} from 'react-native';
import AttachmentCarouselPagerContext from '@components/Attachments/AttachmentCarousel/Pager/AttachmentCarouselPagerContext';
import type {Attachment, AttachmentSource} from '@components/Attachments/types';
import Button from '@components/Button';
import DistanceEReceipt from '@components/DistanceEReceipt';
import EReceipt from '@components/EReceipt';
import Icon from '@components/Icon';
import {Gallery} from '@components/Icon/Expensicons';
import {ArrowCircleClockwise, Gallery} from '@components/Icon/Expensicons';
import PerDiemEReceipt from '@components/PerDiemEReceipt';
import ScrollView from '@components/ScrollView';
import Text from '@components/Text';
Expand Down Expand Up @@ -271,6 +272,16 @@ function AttachmentView({
<View>
<Text style={[styles.notFoundTextHeader]}>{translate('attachmentView.attachmentNotFound')}</Text>
</View>
<Button
text={translate('attachmentView.retry')}
icon={ArrowCircleClockwise}
onPress={() => {
if (isOffline) {
return;
}
setImageError(false);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am yet to test but I can see setImageError is a boolean state value. I am not sure what's the logic of retrying. Let me pull the code and check locally.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just the original comment in the issue body, that clicking the not found view loads, so I got it now.

}}
/>
</View>
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import AddReaction from '@assets/images/add-reaction.svg';
import All from '@assets/images/all.svg';
import Android from '@assets/images/android.svg';
import Apple from '@assets/images/apple.svg';
import ArrowCircleClockwise from '@assets/images/arrow-circle-clockwise.svg';
import ArrowCollapse from '@assets/images/arrow-collapse.svg';
import ArrowDownLong from '@assets/images/arrow-down-long.svg';
import ArrowRightLong from '@assets/images/arrow-right-long.svg';
Expand Down Expand Up @@ -492,4 +493,5 @@ export {
SageIntacctExport,
SapExport,
XeroExport,
ArrowCircleClockwise,
};
1 change: 1 addition & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2797,6 +2797,7 @@ const translations = {
formLabel: 'PDF anzeigen',
},
attachmentNotFound: 'Anhang nicht gefunden',
retry: 'Wiederholen',
},
messages: {
errorMessageInvalidPhone: `Bitte geben Sie eine gültige Telefonnummer ohne Klammern oder Bindestriche ein. Wenn Sie sich außerhalb der USA befinden, geben Sie bitte Ihre Ländervorwahl an (z. B. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2798,6 +2798,7 @@ const translations = {
formLabel: 'View PDF',
},
attachmentNotFound: 'Attachment not found',
retry: 'Retry',
},
messages: {
errorMessageInvalidPhone: `Please enter a valid phone number without brackets or dashes. If you're outside the US, please include your country code (e.g. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2783,6 +2783,7 @@ const translations = {
formLabel: 'Ver PDF',
},
attachmentNotFound: 'Archivo adjunto no encontrado',
retry: 'Reintentar',
},
messages: {
errorMessageInvalidPhone: `Por favor, introduce un número de teléfono válido sin paréntesis o guiones. Si reside fuera de Estados Unidos, por favor incluye el prefijo internacional (p. ej. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2801,6 +2801,7 @@ const translations = {
formLabel: 'Voir le PDF',
},
attachmentNotFound: 'Pièce jointe introuvable',
retry: 'Réessayer',
},
messages: {
errorMessageInvalidPhone: `Veuillez entrer un numéro de téléphone valide sans parenthèses ni tirets. Si vous êtes en dehors des États-Unis, veuillez inclure votre indicatif de pays (par exemple, ${CONST.EXAMPLE_PHONE_NUMBER}).`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2810,6 +2810,7 @@ const translations = {
formLabel: 'Visualizza PDF',
},
attachmentNotFound: 'Allegato non trovato',
retry: 'Riprova',
},
messages: {
errorMessageInvalidPhone: `Per favore, inserisci un numero di telefono valido senza parentesi o trattini. Se ti trovi al di fuori degli Stati Uniti, includi il tuo prefisso internazionale (ad es. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2816,6 +2816,7 @@ const translations = {
formLabel: 'PDFを表示',
},
attachmentNotFound: '添付ファイルが見つかりません',
retry: '再試行',
},
messages: {
errorMessageInvalidPhone: `有効な電話番号を括弧やダッシュなしで入力してください。米国外の場合は、国コードを含めてください(例: ${CONST.EXAMPLE_PHONE_NUMBER})。`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2817,6 +2817,7 @@ const translations = {
formLabel: 'PDF bekijken',
},
attachmentNotFound: 'Bijlage niet gevonden',
retry: 'Opnieuw proberen',
},
messages: {
errorMessageInvalidPhone: `Voer alstublieft een geldig telefoonnummer in zonder haakjes of streepjes. Als u zich buiten de VS bevindt, voeg dan uw landcode toe (bijv. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2811,6 +2811,7 @@ const translations = {
formLabel: 'Pokaż PDF',
},
attachmentNotFound: 'Załącznik nie znaleziony',
retry: 'Ponów próbę',
},
messages: {
errorMessageInvalidPhone: `Proszę wprowadzić prawidłowy numer telefonu bez nawiasów i myślników. Jeśli jesteś poza USA, dołącz swój kod kraju (np. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2816,6 +2816,7 @@ const translations = {
formLabel: 'Ver PDF',
},
attachmentNotFound: 'Anexo não encontrado',
retry: 'Tentar novamente',
},
messages: {
errorMessageInvalidPhone: `Por favor, insira um número de telefone válido sem parênteses ou traços. Se você estiver fora dos EUA, inclua o código do seu país (ex.: ${CONST.EXAMPLE_PHONE_NUMBER}).`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2781,6 +2781,7 @@ const translations = {
formLabel: '查看PDF',
},
attachmentNotFound: '未找到附件',
retry: '重试',
},
messages: {
errorMessageInvalidPhone: `请输入一个有效的电话号码,不要使用括号或破折号。如果您在美国以外,请包括您的国家代码(例如 ${CONST.EXAMPLE_PHONE_NUMBER})。`,
Expand Down
3 changes: 1 addition & 2 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2670,8 +2670,7 @@ const styles = (theme: ThemeColors) =>
color: theme.heading,
fontSize: variables.fontSizeXLarge,
lineHeight: variables.lineHeightXXLarge,
marginTop: 20,
marginBottom: 8,
marginVertical: 20,
textAlign: 'center',
},

Expand Down
Loading