From 589e2e26663216b701ee11f3701639f57eeaddf9 Mon Sep 17 00:00:00 2001 From: devyaniChoubey <52153085+devyaniChoubey@users.noreply.github.com> Date: Tue, 17 Mar 2020 22:05:37 +0530 Subject: [PATCH] [IMPROVEMENT] Show toast when a message is starred/unstarred (#1616) Co-authored-by: Diego Mello --- app/containers/MessageActions.js | 1 + app/i18n/locales/en.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/containers/MessageActions.js b/app/containers/MessageActions.js index 79f75c7c4..ea2f55a23 100644 --- a/app/containers/MessageActions.js +++ b/app/containers/MessageActions.js @@ -294,6 +294,7 @@ class MessageActions extends React.Component { const { message } = this.props; try { await RocketChat.toggleStarMessage(message.id, message.starred); + EventEmitter.emit(LISTENER, { message: message.starred ? I18n.t('Message_unstarred') : I18n.t('Message_starred') }); } catch (e) { log(e); } diff --git a/app/i18n/locales/en.js b/app/i18n/locales/en.js index f632e7b8d..506cf4808 100644 --- a/app/i18n/locales/en.js +++ b/app/i18n/locales/en.js @@ -264,6 +264,8 @@ export default { Message_actions: 'Message actions', Message_pinned: 'Message pinned', Message_removed: 'Message removed', + Message_starred: 'Message starred', + Message_unstarred: 'Message unstarred', message: 'message', messages: 'messages', Message: 'Message',