mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-26 04:36:42 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user