Don't save white space drafts

Fixes #7308
Closes #7383
master
FeuRenard 2018-02-02 15:56:25 +01:00 committed by Moxie Marlinspike
parent 2beb1dd8d9
commit 527e39eee8
1 changed files with 3 additions and 3 deletions

View File

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