From 6d006e01e309385a243f54ec1eacabbae3eab9b7 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Tue, 3 Jul 2018 17:50:27 +0100 Subject: [PATCH] MM-10951: Change user visible channel delete strings to archive. (#1785) * Change user visible channel delete strings to archive. * Show the archive icon in the channel info view. --- app/screens/channel_info/channel_info.js | 12 +++++----- app/screens/channel_info/channel_info_row.js | 25 ++++++++++++++++---- assets/base/i18n/en.json | 8 +++---- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/app/screens/channel_info/channel_info.js b/app/screens/channel_info/channel_info.js index e9bac6275..25dd6a4bf 100644 --- a/app/screens/channel_info/channel_info.js +++ b/app/screens/channel_info/channel_info.js @@ -183,10 +183,10 @@ export default class ChannelInfo extends PureComponent { }); }; } else if (eventType === 'delete') { - title = {id: 'mobile.channel_info.alertTitleDeleteChannel', defaultMessage: 'Delete {term}'}; + title = {id: 'mobile.channel_info.alertTitleDeleteChannel', defaultMessage: 'Archive {term}'}; message = { id: 'mobile.channel_info.alertMessageDeleteChannel', - defaultMessage: 'Are you sure you want to delete the {term} {name}?', + defaultMessage: 'Are you sure you want to archive the {term} {name}?', }; onPressAction = async () => { const result = await this.props.actions.deleteChannel(channel.id); @@ -196,7 +196,7 @@ export default class ChannelInfo extends PureComponent { result.error, { id: 'mobile.channel_info.delete_failed', - defaultMessage: "We couldn't delete the channel {displayName}. Please check your connection and try again.", + defaultMessage: "We couldn't archive the channel {displayName}. Please check your connection and try again.", }, { displayName: channel.display_name, @@ -464,9 +464,9 @@ export default class ChannelInfo extends PureComponent { + let iconElement = null; + if (image == null) { + iconElement = ( + ); + } else { + iconElement = ( + + ); + } + + const RowComponent = ( + + {iconElement}