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)
aargs.putString("from", message.from[0].toString());
ivAvatar.setTag(message.id);
new SimpleTask<Drawable>() {
@Override
protected void onPreExecute(Bundle args) {
ivAvatar.setTag(message.id);
ivAvatar.setVisibility(View.INVISIBLE);
}
@ -434,7 +433,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, aargs);
}.execute(context, owner, aargs, "message:avatar");
} else
ivAvatar.setVisibility(View.GONE);
@ -600,7 +599,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (body == null && message.content) {
Bundle args = new Bundle();
args.putSerializable("message", message);
bodyTask.execute(context, owner, args);
bodyTask.execute(context, owner, args, "message:body");
}
// Observe attachments
@ -638,7 +637,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (message.content) {
Bundle args = new Bundle();
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) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, sargs);
}.execute(context, owner, sargs, "message:actions");
} else
properties.setBody(message.id, null);
@ -873,7 +872,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:attachment:download");
}
private void onSaveAttachments(TupleMessageEx message) {
@ -913,7 +912,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
Bundle args = new Bundle();
args.putSerializable("message", message);
bodyTask.execute(context, owner, args);
bodyTask.execute(context, owner, args, "message:body");
}
private void onShowImages(final TupleMessageEx message) {
@ -938,7 +937,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
Bundle args = new Bundle();
args.putSerializable("message", message);
bodyTask.execute(context, owner, args);
bodyTask.execute(context, owner, args, "message:body");
}
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) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:spam");
}
})
.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) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:forward");
}
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) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, new Bundle());
}.execute(context, owner, new Bundle(), "message:answer");
}
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) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:unseen");
}
private void onToggleFlag(TupleMessageEx message) {
@ -1384,7 +1383,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:flag");
}
private void onShare(ActionData data) {
@ -1436,7 +1435,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable 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) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:headers");
} else
notifyDataSetChanged();
}
@ -1565,7 +1564,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable 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() {
@ -1599,7 +1598,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:keyword:add");
}
}
}).show();
@ -1612,7 +1611,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:keywords");
}
private void onDecrypt(ActionData data) {
@ -1741,7 +1740,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:delete");
}
})
.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) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:move");
return true;
}
@ -1833,7 +1832,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:move:list");
}
private void onArchive(ActionData data) {
@ -1879,7 +1878,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex);
}
}.execute(context, owner, args);
}.execute(context, owner, args, "message:reply");
}
ItemDetailsLookup.ItemDetails<Long> getItemDetails(@NonNull MotionEvent motionEvent) {