From 67ae09f868d9b610041f2ab84f4aa70fdf8160ac Mon Sep 17 00:00:00 2001 From: CJ <38697367+imisshtml@users.noreply.github.com> Date: Wed, 25 Sep 2019 09:53:52 -0400 Subject: [PATCH] MM-18658 Edit Channel MaxLength (#3317) Set MaxLength on Edit Channel Name. Updated ViewTypes MaxLength from 22 to 64 for validation/errors. --- .../__snapshots__/edit_channel_info.test.js.snap | 1 + app/components/edit_channel_info/edit_channel_info.js | 1 + app/constants/view.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/edit_channel_info/__snapshots__/edit_channel_info.test.js.snap b/app/components/edit_channel_info/__snapshots__/edit_channel_info.test.js.snap index e6e917569..a79dc98cd 100644 --- a/app/components/edit_channel_info/__snapshots__/edit_channel_info.test.js.snap +++ b/app/components/edit_channel_info/__snapshots__/edit_channel_info.test.js.snap @@ -73,6 +73,7 @@ exports[`EditChannelInfo should match snapshot 1`] = ` autoCorrect={false} disableFullscreenUI={true} keyboardAppearance="light" + maxLength={64} onChangeText={[Function]} placeholder={ Object { diff --git a/app/components/edit_channel_info/edit_channel_info.js b/app/components/edit_channel_info/edit_channel_info.js index 7282f35cf..605ac2213 100644 --- a/app/components/edit_channel_info/edit_channel_info.js +++ b/app/components/edit_channel_info/edit_channel_info.js @@ -234,6 +234,7 @@ export default class EditChannelInfo extends PureComponent { placeholderTextColor={changeOpacity(theme.centerChannelColor, 0.5)} underlineColorAndroid='transparent' disableFullscreenUI={true} + maxLength={64} keyboardAppearance={getKeyboardAppearanceFromTheme(theme)} /> diff --git a/app/constants/view.js b/app/constants/view.js index 730d69923..60823c46f 100644 --- a/app/constants/view.js +++ b/app/constants/view.js @@ -104,7 +104,7 @@ export default { EMBED_PREVIEW: 'embed_preview', LINK_PREVIEW_DISPLAY: 'link_previews', MIN_CHANNELNAME_LENGTH: 2, - MAX_CHANNELNAME_LENGTH: 22, + MAX_CHANNELNAME_LENGTH: 64, ANDROID_TOP_LANDSCAPE: 46, ANDROID_TOP_PORTRAIT: 56, IOS_TOP_LANDSCAPE: 40,