Fixes an issue with autocompletion with screen names.

This commit is contained in:
tom79 2017-07-22 12:30:24 +02:00
parent 22edfc7153
commit 8b625a34a9
1 changed files with 2 additions and 2 deletions

View File

@ -144,7 +144,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
private TextView title;
private ImageView pp_actionBar;
private String pattern = "^.*(@([a-zA-Z0-9_]{2,}))$";
private String pattern = "^(.|\\s)*(@([a-zA-Z0-9_]{2,}))$";
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -418,7 +418,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
Pattern sPattern = Pattern.compile(pattern);
Matcher m = sPattern.matcher(s.toString());
if(m.matches()) {
String search = m.group(2);
String search = m.group(3);
new RetrieveSearchAccountsAsyncTask(getApplicationContext(),search,TootActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}else{
toot_show_accounts.setVisibility(View.GONE);