about summary refs log tree commit diff
diff options
context:
space:
mode:
authorchr <chr@cybre.space>2021-03-01 22:47:53 -0800
committerchr <chr@cybre.space>2021-03-01 22:48:36 -0800
commitbd4f834a18761cf765f02d87c2b5cfac10a6c903 (patch)
treeb58b580d7b221ffe9a5228df01d0e6a688835a11
parent16c31821d23713a50dfaa62f282e342d3963a7a1 (diff)
parentaf6d57b7c80dc2e4c6a344a47fd3d162664c66f4 (diff)
Merge branch 'feature_1024_char_toots' into cybrespace-3.3
-rw-r--r--app/javascript/mastodon/features/compose/components/compose_form.js15
1 files changed, 1 insertions, 14 deletions
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js
index 137a30506..a0da1e9d3 100644
--- a/app/javascript/mastodon/features/compose/components/compose_form.js
+++ b/app/javascript/mastodon/features/compose/components/compose_form.js
@@ -86,7 +86,7 @@ class ComposeForm extends ImmutablePureComponent {
     const fulltext = this.getFulltextForCharacterCounting();
     const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
 
-    return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 500 || (isOnlyWhitespace && !anyMedia));
+    return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 1024 || (isOnlyWhitespace && !anyMedia));
   }
 
   handleSubmit = () => {
@@ -96,15 +96,7 @@ class ComposeForm extends ImmutablePureComponent {
       this.props.onChange(this.autosuggestTextarea.textarea.value);
     }
 
-<<<<<<< HEAD
     if (!this.canSubmit()) {
-=======
-    // Submit disabled:
-    const { isSubmitting, isChangingUpload, isUploading, anyMedia } = this.props;
-    const fulltext = [this.props.spoilerText, countableText(this.props.text)].join('');
-
-    if (isSubmitting || isUploading || isChangingUpload || length(fulltext) > 1024 || (fulltext.length !== 0 && fulltext.trim().length === 0 && !anyMedia)) {
->>>>>>> Feature: 1024-character posts in server and client
       return;
     }
 
@@ -196,11 +188,6 @@ class ComposeForm extends ImmutablePureComponent {
   render () {
     const { intl, onPaste, showSearch } = this.props;
     const disabled = this.props.isSubmitting;
-<<<<<<< HEAD
-=======
-    const text     = [this.props.spoilerText, countableText(this.props.text)].join('');
-    const disabledButton = disabled || this.props.isUploading || this.props.isChangingUpload || length(text) > 1024 || (text.length !== 0 && text.trim().length === 0 && !anyMedia);
->>>>>>> Feature: 1024-character posts in server and client
     let publishText = '';
 
     if (this.props.privacy === 'private' || this.props.privacy === 'direct') {