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

This commit is contained in:
Evgeny Petrov 2019-04-20 13:17:54 +03:00 committed by Konrad Pozniak
parent 9e91288c21
commit d929e971e6

View File

@ -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) {