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