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 fb2d3024ab
commit 8a6b439408

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