mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-29 12:22:21 -05:00
UserActivity: Do not update list in Thread. Use a background task later
This commit is contained in:
parent
4fc593050f
commit
99cf534f20
@ -57,12 +57,8 @@ public class UsersActivity extends ListActivity implements OnItemClickListener
|
||||
|
||||
// Add sorted list of users in own thread to avoid blocking UI
|
||||
// TODO: Move to a background task and show loading indicator while sorting
|
||||
(new Thread() {
|
||||
public void run() {
|
||||
Arrays.sort(users, String.CASE_INSENSITIVE_ORDER);
|
||||
getListView().setAdapter(new ArrayAdapter<String>(UsersActivity.this, R.layout.useritem, users));
|
||||
}
|
||||
}).start();
|
||||
Arrays.sort(users, String.CASE_INSENSITIVE_ORDER);
|
||||
getListView().setAdapter(new ArrayAdapter<String>(UsersActivity.this, R.layout.useritem, users));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user