feat: remove custom icon for toasts as only used once

pull/3071/head
Audric Ackermann 1 month ago
parent f304a5239f
commit 7f1e3ed8d8

@ -5,6 +5,7 @@ import { getShowScrollButton } from '../state/selectors/conversations';
import { useSelectedUnreadCount } from '../state/selectors/selectedConversation';
import { SessionIconButton } from './icon';
import { SessionUnreadCount } from './icon/SessionNotificationCount';
const SessionScrollButtonDiv = styled.div`
position: fixed;

@ -1,7 +1,6 @@
import React from 'react';
import { toast } from 'react-toastify';
import { SessionToast, SessionToastType } from '../../components/basic/SessionToast';
import { SessionIconType } from '../../components/icon';
import { SessionSettingCategory } from '../../components/settings/SessionSettings';
import { SectionType, showLeftPaneSection, showSettingsSection } from '../../state/ducks/section';
@ -38,19 +37,9 @@ export function pushToastInfo(
);
}
export function pushToastSuccess(
id: string,
title: string,
description?: string,
icon?: SessionIconType
) {
export function pushToastSuccess(id: string, title: string, description?: string) {
toast.success(
<SessionToast
title={title}
description={description}
type={SessionToastType.Success}
icon={icon}
/>,
<SessionToast title={title} description={description} type={SessionToastType.Success} />,
{ toastId: id, updateId: id }
);
}
@ -210,12 +199,7 @@ export function someDeletionsFailed() {
}
export function pushDeleted(messageCount: number) {
pushToastSuccess(
'deleted',
window.i18n('deleted', [messageCount.toString()]),
undefined,
'check'
);
pushToastSuccess('deleted', window.i18n('deleted', [messageCount.toString()]), undefined);
}
export function pushCannotRemoveCreatorFromGroup() {

Loading…
Cancel
Save