MM-24113 Support 'leave' slash command (#4273)

Fixes crash on Android when attempting to redirect back to a read-only channel (default channel) after using the `/leave` command.

Also, enables official support of `leave` slash command. Added as auto-complete suggestion.
This commit is contained in:
Amit Uttam 2020-05-07 13:58:09 -03:00 committed by GitHub
parent 65314fae47
commit fd450f9988
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -14,7 +14,7 @@ import {isLandscape} from 'app/selectors/device';
import SlashSuggestion from './slash_suggestion';
// TODO: Remove when all below commands have been implemented
const COMMANDS_TO_IMPLEMENT_LATER = ['collapse', 'expand', 'join', 'open', 'leave', 'logout', 'msg', 'grpmsg'];
const COMMANDS_TO_IMPLEMENT_LATER = ['collapse', 'expand', 'join', 'open', 'logout', 'msg', 'grpmsg'];
const NON_MOBILE_COMMANDS = ['rename', 'invite_people', 'shortcuts', 'search', 'help', 'settings', 'remove'];
const COMMANDS_TO_HIDE_ON_MOBILE = [...COMMANDS_TO_IMPLEMENT_LATER, ...NON_MOBILE_COMMANDS];

View file

@ -51,6 +51,7 @@ export default class ChannelAndroid extends ChannelBase {
<PostDraft
ref={this.postDraft}
screenId={this.props.componentId}
key={this.props.currentChannelId}
/>
</KeyboardLayout>
<NetworkIndicator/>