From 61fcadc87953c2d3dfd314aea7412e870a7164a7 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Fri, 3 May 2019 10:30:34 -0300 Subject: [PATCH] [FIX] Toggle/follow thread icon (#867) --- app/i18n/locales/en.js | 2 ++ app/i18n/locales/pt-BR.js | 2 ++ app/views/RoomView/Header/RightButtons.js | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/i18n/locales/en.js b/app/i18n/locales/en.js index 364e55ccfc..334e2c3de8 100644 --- a/app/i18n/locales/en.js +++ b/app/i18n/locales/en.js @@ -160,6 +160,7 @@ export default { File_description: 'File description', File_name: 'File name', Finish_recording: 'Finish recording', + Following_thread: 'Following thread', For_your_security_you_must_enter_your_current_password_to_continue: 'For your security, you must enter your current password to continue', Forgot_my_password: 'Forgot my password', Forgot_password_If_this_email_is_registered: 'If this email is registered, we\'ll send instructions on how to reset your password. If you do not receive an email shortly, please come back and try again.', @@ -332,6 +333,7 @@ export default { unarchive: 'unarchive', UNARCHIVE: 'UNARCHIVE', Unblock_user: 'Unblock user', + Unfollowed_thread: 'Unfollowed thread', Unmute: 'Unmute', unmuted: 'unmuted', Unpin: 'Unpin', diff --git a/app/i18n/locales/pt-BR.js b/app/i18n/locales/pt-BR.js index e3c9078b31..50decbecbb 100644 --- a/app/i18n/locales/pt-BR.js +++ b/app/i18n/locales/pt-BR.js @@ -167,6 +167,7 @@ export default { File_description: 'Descrição do arquivo', File_name: 'Nome do arquivo', Finish_recording: 'Encerrar gravação', + Following_thread: 'Começou a seguir tópico', For_your_security_you_must_enter_your_current_password_to_continue: 'Para sua segurança, você precisa digitar sua senha', Forgot_my_password: 'Esqueci minha senha', Forgot_password_If_this_email_is_registered: 'Se este e-mail estiver cadastrado, enviaremos instruções sobre como redefinir sua senha. Se você não receber um e-mail em breve, volte e tente novamente.', @@ -330,6 +331,7 @@ export default { unarchive: 'desarquivar', UNARCHIVE: 'DESARQUIVAR', Unblock_user: 'Desbloquear usuário', + Unfollowed_thread: 'Parou de seguir tópico', Unmute: 'Permitir que o usuário fale', unmuted: 'permitiu que o usuário fale', Unpin: 'Desafixar Mensagem', diff --git a/app/views/RoomView/Header/RightButtons.js b/app/views/RoomView/Header/RightButtons.js index 10a6c8e469..1732d65339 100644 --- a/app/views/RoomView/Header/RightButtons.js +++ b/app/views/RoomView/Header/RightButtons.js @@ -7,6 +7,7 @@ import { CustomHeaderButtons, Item } from '../../../containers/HeaderButton'; import database, { safeAddListener } from '../../../lib/realm'; import RocketChat from '../../../lib/rocketchat'; import log from '../../../utils/log'; +import { showToast } from '../../../utils/info'; const styles = StyleSheet.create({ more: { @@ -69,6 +70,7 @@ class RightButtonsContainer extends React.PureComponent { const { tmid } = this.props; try { await RocketChat.toggleFollowMessage(tmid, !isFollowingThread); + showToast(isFollowingThread ? 'Unfollowed thread' : 'Following thread'); } catch (e) { console.log('TCL: RightButtonsContainer -> toggleFollowThread -> e', e); log('toggleFollowThread', e); @@ -86,7 +88,7 @@ class RightButtonsContainer extends React.PureComponent {