|
|
|
@ -1448,10 +1448,16 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
|
etTo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
|
|
|
|
|
try {
|
|
|
|
|
Cursor cursor = (Cursor) adapterView.getAdapter().getItem(position);
|
|
|
|
|
if (cursor != null && cursor.getCount() > 0) {
|
|
|
|
|
int colEmail = cursor.getColumnIndex("email");
|
|
|
|
|
selectIdentityForEmail(colEmail < 0 ? null : cursor.getString(colEmail));
|
|
|
|
|
}
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
grpAddresses.setVisibility(cc_bcc ? View.VISIBLE : View.GONE);
|
|
|
|
@ -7482,9 +7488,11 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
try {
|
|
|
|
|
int target = spTarget.getSelectedItemPosition();
|
|
|
|
|
Cursor cursor = (Cursor) spGroup.getSelectedItem();
|
|
|
|
|
if (target != INVALID_POSITION && cursor != null) {
|
|
|
|
|
if (target != INVALID_POSITION &&
|
|
|
|
|
cursor != null && cursor.getCount() > 0) {
|
|
|
|
|
long group = cursor.getLong(0);
|
|
|
|
|
String name = cursor.getString(1);
|
|
|
|
|
|
|
|
|
@ -7498,6 +7506,9 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
|
sendResult(RESULT_OK);
|
|
|
|
|
} else
|
|
|
|
|
sendResult(RESULT_CANCELED);
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.setNegativeButton(android.R.string.cancel, null)
|
|
|
|
|