Message task names

This commit is contained in:
M66B 2019-01-07 10:17:27 +00:00
parent 2068c7b340
commit 1b3f8e5f3f
1 changed files with 22 additions and 23 deletions

View File

@ -388,11 +388,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (message.from != null && message.from.length > 0) if (message.from != null && message.from.length > 0)
aargs.putString("from", message.from[0].toString()); aargs.putString("from", message.from[0].toString());
ivAvatar.setTag(message.id);
new SimpleTask<Drawable>() { new SimpleTask<Drawable>() {
@Override @Override
protected void onPreExecute(Bundle args) { protected void onPreExecute(Bundle args) {
ivAvatar.setTag(message.id);
ivAvatar.setVisibility(View.INVISIBLE); ivAvatar.setVisibility(View.INVISIBLE);
} }
@ -434,7 +433,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, aargs); }.execute(context, owner, aargs, "message:avatar");
} else } else
ivAvatar.setVisibility(View.GONE); ivAvatar.setVisibility(View.GONE);
@ -600,7 +599,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (body == null && message.content) { if (body == null && message.content) {
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putSerializable("message", message); args.putSerializable("message", message);
bodyTask.execute(context, owner, args); bodyTask.execute(context, owner, args, "message:body");
} }
// Observe attachments // Observe attachments
@ -638,7 +637,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (message.content) { if (message.content) {
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putSerializable("message", message); args.putSerializable("message", message);
bodyTask.execute(context, owner, args); bodyTask.execute(context, owner, args, "message:body");
} }
} }
}; };
@ -708,7 +707,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, sargs); }.execute(context, owner, sargs, "message:actions");
} else } else
properties.setBody(message.id, null); properties.setBody(message.id, null);
@ -873,7 +872,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:attachment:download");
} }
private void onSaveAttachments(TupleMessageEx message) { private void onSaveAttachments(TupleMessageEx message) {
@ -913,7 +912,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putSerializable("message", message); args.putSerializable("message", message);
bodyTask.execute(context, owner, args); bodyTask.execute(context, owner, args, "message:body");
} }
private void onShowImages(final TupleMessageEx message) { private void onShowImages(final TupleMessageEx message) {
@ -938,7 +937,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putSerializable("message", message); args.putSerializable("message", message);
bodyTask.execute(context, owner, args); bodyTask.execute(context, owner, args, "message:body");
} }
private SimpleTask<SpannableStringBuilder> bodyTask = new SimpleTask<SpannableStringBuilder>() { private SimpleTask<SpannableStringBuilder> bodyTask = new SimpleTask<SpannableStringBuilder>() {
@ -1187,7 +1186,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:spam");
} }
}) })
.setNegativeButton(android.R.string.cancel, null) .setNegativeButton(android.R.string.cancel, null)
@ -1234,7 +1233,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:forward");
} }
private void onAnswer(final ActionData data) { private void onAnswer(final ActionData data) {
@ -1302,7 +1301,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, new Bundle()); }.execute(context, owner, new Bundle(), "message:answer");
} }
private void onUnseen(final ActionData data) { private void onUnseen(final ActionData data) {
@ -1342,7 +1341,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:unseen");
} }
private void onToggleFlag(TupleMessageEx message) { private void onToggleFlag(TupleMessageEx message) {
@ -1384,7 +1383,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:flag");
} }
private void onShare(ActionData data) { private void onShare(ActionData data) {
@ -1436,7 +1435,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:share");
} }
@ -1479,7 +1478,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:headers");
} else } else
notifyDataSetChanged(); notifyDataSetChanged();
} }
@ -1565,7 +1564,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:keywords:managa");
} }
}) })
.setNeutralButton(R.string.title_add, new DialogInterface.OnClickListener() { .setNeutralButton(R.string.title_add, new DialogInterface.OnClickListener() {
@ -1599,7 +1598,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:keyword:add");
} }
} }
}).show(); }).show();
@ -1612,7 +1611,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:keywords");
} }
private void onDecrypt(ActionData data) { private void onDecrypt(ActionData data) {
@ -1741,7 +1740,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:delete");
} }
}) })
.setNegativeButton(android.R.string.cancel, null) .setNegativeButton(android.R.string.cancel, null)
@ -1820,7 +1819,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:move");
return true; return true;
} }
@ -1833,7 +1832,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:move:list");
} }
private void onArchive(ActionData data) { private void onArchive(ActionData data) {
@ -1879,7 +1878,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex); Helper.unexpectedError(context, owner, ex);
} }
}.execute(context, owner, args); }.execute(context, owner, args, "message:reply");
} }
ItemDetailsLookup.ItemDetails<Long> getItemDetails(@NonNull MotionEvent motionEvent) { ItemDetailsLookup.ItemDetails<Long> getItemDetails(@NonNull MotionEvent motionEvent) {