mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 17:08:57 +01:00
Show info for permanently undownloadable visual attachments
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user