Added check if text in compose toot field has only whitespaces (#1193)

main
Evgeny Petrov 6 years ago committed by Konrad Pozniak
parent 9e91288c21
commit d929e971e6
  1. 2
      app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java

@ -1016,7 +1016,7 @@ public final class ComposeActivity
spoilerText = contentWarningEditor.getText().toString();
}
int characterCount = calculateTextLength();
if (characterCount <= 0 && mediaQueued.size() == 0) {
if ((characterCount <= 0 || contentText.trim().length() <= 0) && mediaQueued.size() == 0) {
textEditor.setError(getString(R.string.error_empty));
enableButtons();
} else if (characterCount <= maximumTootCharacters) {

Loading…
Cancel
Save