WhisperSystems/TextSecure — pull request #918 by tinloaf (2014-03-01 20:00:30+00:00)
Title: Improve the Loading of the Contact List (don't block UI thread) & Add option to not display non-Push contacts. Fixes #664.

Up to now, we did the loading of the contact list in a strange way:
- Contacts from the phone's address book were retrieved using a background loader (good, does not block the UI thread)
- (Push) Contacts from our database were loaded in onLoadComplete(), i.e. in the UI thread, blocking it.

In a perfect world, every contact would also be a push contact, i.e. loading the push contacts would take just as much time as loading the "normal" contacts. I rebuilt this so that everything is being loaded in a background thread. See commit message for implementation details.

In the second commit, I added an option that should fix #664, hiding of non-push users. I only did this in one list yet (the one where you select someone to open a conversation with). If we want this, I'll modify the other lists (especially the select-multiple-contacts-list) accordingly.