From d11b1a1aa7a44e345f2458a712e6bbed85db267f Mon Sep 17 00:00:00 2001 From: Lain Iwakura Date: Tue, 14 Nov 2017 16:24:10 +0100 Subject: [PATCH] Handle character limit in initial state in frontend. --- .../mastodon/features/compose/components/compose_form.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js index 7890755f3..1b64f7fc7 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.js +++ b/app/javascript/mastodon/features/compose/components/compose_form.js @@ -18,6 +18,8 @@ import { isMobile } from '../../../is_mobile'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { length } from 'stringz'; import { countableText } from '../util/counter'; +import initialState from '../../../initial_state'; +const maxChars = initialState.max_chars; const messages = defineMessages({ placeholder: { id: 'compose_form.placeholder', defaultMessage: 'What is on your mind?' }, @@ -201,8 +203,8 @@ export default class ComposeForm extends ImmutablePureComponent {
-
-
+
+