Show info for permanently undownloadable visual attachments

This commit is contained in:
ayumi-signal
2025-01-15 09:15:32 -08:00
committed by GitHub
parent 6451ff0cf1
commit 1cc26d5cc7
23 changed files with 314 additions and 15 deletions
+16
View File
@@ -16,6 +16,8 @@ import type { AnyToast } from '../types/Toast';
import { ToastType } from '../types/Toast';
import type { AnyActionableMegaphone } from '../types/Megaphone';
import { MegaphoneType } from '../types/Megaphone';
import { openLinkInWebBrowser } from '../util/openLinkInWebBrowser';
import { LINKED_DEVICES_URL } from '../types/support';
export type PropsType = {
hideToast: () => unknown;
@@ -407,6 +409,20 @@ export function renderToast({
return <Toast onClose={hideToast}>{i18n('icu:maximumAttachments')}</Toast>;
}
if (toastType === ToastType.MediaNoLongerAvailable) {
return (
<Toast
onClose={hideToast}
toastAction={{
label: i18n('icu:attachmentNoLongerAvailable__learnMore'),
onClick: () => openLinkInWebBrowser(LINKED_DEVICES_URL),
}}
>
{i18n('icu:mediaNoLongerAvailable')}
</Toast>
);
}
if (toastType === ToastType.MessageBodyTooLong) {
return <Toast onClose={hideToast}>{i18n('icu:messageBodyTooLong')}</Toast>;
}