ConversationView: Pull various functions out of getMessageActions
This commit is contained in:
parent
5a98fc2f4c
commit
1e282ee5d0
42 changed files with 440 additions and 570 deletions
|
@ -60,6 +60,22 @@ export function ToastManager({
|
|||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.CannotOpenGiftBadgeIncoming) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('message--giftBadge--unopened--toast--incoming')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.CannotOpenGiftBadgeOutgoing) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('message--giftBadge--unopened--toast--outgoing')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.CannotStartGroupCall) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
|
@ -173,6 +189,10 @@ export function ToastManager({
|
|||
return <Toast onClose={hideToast}>{i18n('pinnedConversationsFull')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.ReactionFailed) {
|
||||
return <Toast onClose={hideToast}>{i18n('Reactions--error')}</Toast>;
|
||||
}
|
||||
|
||||
if (toastType === ToastType.StoryMuted) {
|
||||
return (
|
||||
<Toast onClose={hideToast} timeout={SHORT_TIMEOUT}>
|
||||
|
@ -221,6 +241,22 @@ export function ToastManager({
|
|||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.TapToViewExpiredIncoming) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('Message--tap-to-view--incoming--expired-toast')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.TapToViewExpiredOutgoing) {
|
||||
return (
|
||||
<Toast onClose={hideToast}>
|
||||
{i18n('Message--tap-to-view--outgoing--expired-toast')}
|
||||
</Toast>
|
||||
);
|
||||
}
|
||||
|
||||
if (toastType === ToastType.UnableToLoadAttachment) {
|
||||
return <Toast onClose={hideToast}>{i18n('unableToLoadAttachment')}</Toast>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue