"Empty Trash" now shows the correct notice message

This commit is contained in:
Amine Ben hammou
2018-02-06 14:35:37 +00:00
parent a2270d6689
commit ab3a2f064f

View File

@@ -579,9 +579,12 @@ const Listing = React.createClass({
action: 'delete',
group: 'trash',
}).done((response) => {
MailPoet.Notice.success(
MailPoet.I18n.t('permanentlyDeleted').replace('%d', response.meta.count)
);
if (
this.props.messages !== undefined
&& this.props.messages.onDelete !== undefined
) {
this.props.messages.onDelete(response);
}
// redirect to default group
this.handleGroup('all');
}).fail((response) => {