From 8a6b439408f0d162df865003dab9af241eea40c5 Mon Sep 17 00:00:00 2001 From: Evgeny Petrov Date: Sat, 20 Apr 2019 13:17:54 +0300 Subject: [PATCH] Added check if text in compose toot field has only whitespaces (#1193) --- app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index e26f9e646..8b64c7ea9 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/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) {