refactor and improve contact selection

* unify single and multi contact selection activities
* follow android listview design recommendations more closely
* add contact photos to selection
* change indicator for push to be more obvious
* cache circle-cropped bitmaps
* dedupe numbers when contact has multiple of same phone number

// FREEBIE
This commit is contained in:
Jake McGinty
2014-03-17 23:25:09 -07:00
parent c414334059
commit ca6d8a8a0d
42 changed files with 1173 additions and 876 deletions

View File

@@ -544,39 +544,7 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr
private class DirectoryUpdateListener implements Preference.OnPreferenceClickListener {
@Override
public boolean onPreferenceClick(Preference preference) {
final Context context = ApplicationPreferencesActivity.this;
if (!TextSecurePreferences.isPushRegistered(context)) {
Toast.makeText(context,
getString(R.string.ApplicationPreferencesActivity_you_are_not_registered_with_the_push_service),
Toast.LENGTH_LONG).show();
return true;
}
new AsyncTask<Void, Void, Void>() {
private ProgressDialog progress;
@Override
protected void onPreExecute() {
progress = ProgressDialog.show(context,
getString(R.string.ApplicationPreferencesActivity_updating_directory),
getString(R.string.ApplicationPreferencesActivity_updating_push_directory),
true);
}
@Override
protected Void doInBackground(Void... params) {
DirectoryHelper.refreshDirectory(context);
return null;
}
@Override
protected void onPostExecute(Void result) {
if (progress != null)
progress.dismiss();
}
}.execute();
DirectoryHelper.refreshDirectoryWithProgressDialog(ApplicationPreferencesActivity.this);
return true;
}
}