mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Merge branch 'fix_groupname_validation' into 'master'
Fix groupname validation See merge request !531
This commit is contained in:
@@ -10,6 +10,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import org.briarproject.bramble.util.StringUtils;
|
||||
import org.briarproject.briar.R;
|
||||
import org.briarproject.briar.android.activity.ActivityComponent;
|
||||
import org.briarproject.briar.android.fragment.BaseFragment;
|
||||
@@ -84,9 +85,9 @@ public class CreateGroupFragment extends BaseFragment {
|
||||
|
||||
private void validateName() {
|
||||
String name = this.name.getText().toString();
|
||||
if (name.length() < 1 || name.length() > MAX_GROUP_NAME_LENGTH)
|
||||
if (name.length() < 1 || StringUtils.utf8IsTooLong(name, MAX_GROUP_NAME_LENGTH))
|
||||
button.setEnabled(false);
|
||||
else if(!button.isEnabled())
|
||||
else if (!button.isEnabled())
|
||||
button.setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user