diff --git a/src/org/thoughtcrime/securesms/util/Util.java b/src/org/thoughtcrime/securesms/util/Util.java index 17456b92b5..a4dcc24cd0 100644 --- a/src/org/thoughtcrime/securesms/util/Util.java +++ b/src/org/thoughtcrime/securesms/util/Util.java @@ -40,7 +40,6 @@ import android.text.SpannableString; import android.text.TextUtils; import android.text.style.StyleSpan; import android.util.Log; -import android.widget.EditText; import com.google.android.mms.pdu_alt.CharacterSets; import com.google.android.mms.pdu_alt.EncodedStringValue; @@ -49,6 +48,7 @@ import com.google.i18n.phonenumbers.PhoneNumberUtil; import com.google.i18n.phonenumbers.Phonenumber; import org.thoughtcrime.securesms.BuildConfig; +import org.thoughtcrime.securesms.components.ComposeText; import org.thoughtcrime.securesms.database.Address; import org.thoughtcrime.securesms.mms.OutgoingLegacyMmsConnection; import org.whispersystems.libsignal.util.guava.Optional; @@ -126,8 +126,8 @@ public class Util { return value == null || value.length == 0; } - public static boolean isEmpty(EditText value) { - return value == null || value.getText() == null || TextUtils.isEmpty(value.getText().toString()); + public static boolean isEmpty(ComposeText value) { + return value == null || value.getText() == null || TextUtils.isEmpty(value.getTextTrimmed()); } public static CharSequence getBoldedString(String value) {