|
|
|
@ -340,6 +340,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
private ImageButton ibVerified;
|
|
|
|
|
private ImageButton ibAuth;
|
|
|
|
|
private ImageButton ibPriority;
|
|
|
|
|
private ImageButton ibSensitivity;
|
|
|
|
|
private ImageView ivImportance;
|
|
|
|
|
private ImageView ivSigned;
|
|
|
|
|
private ImageView ivEncrypted;
|
|
|
|
@ -648,6 +649,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ibVerified = itemView.findViewById(R.id.ibVerified);
|
|
|
|
|
ibAuth = itemView.findViewById(R.id.ibAuth);
|
|
|
|
|
ibPriority = itemView.findViewById(R.id.ibPriority);
|
|
|
|
|
ibSensitivity = itemView.findViewById(R.id.ibSensitivity);
|
|
|
|
|
ivImportance = itemView.findViewById(R.id.ivImportance);
|
|
|
|
|
ivSigned = itemView.findViewById(R.id.ivSigned);
|
|
|
|
|
ivEncrypted = itemView.findViewById(R.id.ivEncrypted);
|
|
|
|
@ -911,6 +913,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ibVerified.setOnClickListener(this);
|
|
|
|
|
ibAuth.setOnClickListener(this);
|
|
|
|
|
ibPriority.setOnClickListener(this);
|
|
|
|
|
ibSensitivity.setOnClickListener(this);
|
|
|
|
|
ibSnoozed.setOnClickListener(this);
|
|
|
|
|
ibFlagged.setOnClickListener(this);
|
|
|
|
|
if (viewType == ViewType.THREAD) {
|
|
|
|
@ -1014,6 +1017,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ibVerified.setOnClickListener(null);
|
|
|
|
|
ibAuth.setOnClickListener(null);
|
|
|
|
|
ibPriority.setOnClickListener(null);
|
|
|
|
|
ibSensitivity.setOnClickListener(null);
|
|
|
|
|
ibSnoozed.setOnClickListener(null);
|
|
|
|
|
ibFlagged.setOnClickListener(null);
|
|
|
|
|
if (viewType == ViewType.THREAD) {
|
|
|
|
@ -1156,6 +1160,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ibVerified.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
|
ibAuth.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
|
ibPriority.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
|
ibSensitivity.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
|
ivImportance.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
|
ivSigned.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
|
ivEncrypted.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
@ -1243,6 +1248,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
} else
|
|
|
|
|
ibPriority.setVisibility(View.GONE);
|
|
|
|
|
|
|
|
|
|
ibSensitivity.setImageLevel(message.sensitivity == null ? 0 : message.sensitivity);
|
|
|
|
|
ibSensitivity.setVisibility(message.sensitivity == null ? View.GONE : View.VISIBLE);
|
|
|
|
|
|
|
|
|
|
if (EntityMessage.PRIORITIY_HIGH.equals(message.ui_importance)) {
|
|
|
|
|
ivImportance.setImageLevel(message.ui_importance);
|
|
|
|
|
ivImportance.setVisibility(View.VISIBLE);
|
|
|
|
@ -3503,6 +3511,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
onShowAuth(message);
|
|
|
|
|
else if (id == R.id.ibPriority)
|
|
|
|
|
onShowPriority(message);
|
|
|
|
|
else if (id == R.id.ibSensitivity)
|
|
|
|
|
onShowSensitivity(message);
|
|
|
|
|
else if (id == R.id.ibSnoozed)
|
|
|
|
|
onShowSnoozed(message);
|
|
|
|
|
else if (id == R.id.ibFlagged)
|
|
|
|
@ -3974,6 +3984,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
|
ToastEx.makeText(context, R.string.title_legend_priority_low, Toast.LENGTH_LONG).show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onShowSensitivity(TupleMessageEx message) {
|
|
|
|
|
int resid = -1;
|
|
|
|
|
if (EntityMessage.SENSITIVITY_PERSONAL.equals(message.sensitivity))
|
|
|
|
|
resid = R.string.title_legend_sensitivity_personal;
|
|
|
|
|
else if (EntityMessage.SENSITIVITY_PRIVATE.equals(message.sensitivity))
|
|
|
|
|
resid = R.string.title_legend_sensitivity_private;
|
|
|
|
|
else if (EntityMessage.SENSITIVITY_CONFIDENTIAL.equals(message.sensitivity))
|
|
|
|
|
resid = R.string.title_legend_sensitivity_confidential;
|
|
|
|
|
if (resid > 0)
|
|
|
|
|
ToastEx.makeText(context, resid, Toast.LENGTH_LONG).show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onShowSnoozed(TupleMessageEx message) {
|
|
|
|
|
if (message.ui_snoozed != null && message.ui_snoozed != Long.MAX_VALUE) {
|
|
|
|
|
DateFormat DTF = Helper.getDateTimeInstance(context, SimpleDateFormat.MEDIUM, SimpleDateFormat.SHORT);
|
|
|
|
|