Conditionally show message stored time

This commit is contained in:
M66B
2020-11-08 12:38:24 +01:00
parent 12e530f4fc
commit a2a0f22687
3 changed files with 39 additions and 3 deletions

View File

@@ -382,6 +382,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private TextView tvIdentityTitle;
private TextView tvSentTitle;
private TextView tvReceivedTitle;
private TextView tvStoredTitle;
private TextView tvSizeExTitle;
private TextView tvLanguageTitle;
@@ -395,6 +396,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private TextView tvIdentity;
private TextView tvSent;
private TextView tvReceived;
private TextView tvStored;
private TextView tvSizeEx;
private TextView tvLanguage;
@@ -582,6 +584,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvIdentityTitle = vsBody.findViewById(R.id.tvIdentityTitle);
tvSentTitle = vsBody.findViewById(R.id.tvSentTitle);
tvReceivedTitle = vsBody.findViewById(R.id.tvReceivedTitle);
tvStoredTitle = vsBody.findViewById(R.id.tvStoredTitle);
tvSizeExTitle = vsBody.findViewById(R.id.tvSizeExTitle);
tvLanguageTitle = vsBody.findViewById(R.id.tvLanguageTitle);
@@ -595,6 +598,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvIdentity = vsBody.findViewById(R.id.tvIdentity);
tvSent = vsBody.findViewById(R.id.tvSent);
tvReceived = vsBody.findViewById(R.id.tvReceived);
tvStored = vsBody.findViewById(R.id.tvStored);
tvSizeEx = vsBody.findViewById(R.id.tvSizeEx);
tvLanguage = vsBody.findViewById(R.id.tvLanguage);
@@ -1263,6 +1267,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvIdentityTitle.setVisibility(View.GONE);
tvSentTitle.setVisibility(View.GONE);
tvReceivedTitle.setVisibility(View.GONE);
tvStoredTitle.setVisibility(View.GONE);
tvSizeExTitle.setVisibility(View.GONE);
tvLanguageTitle.setVisibility(View.GONE);
@@ -1276,6 +1281,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvIdentity.setVisibility(View.GONE);
tvSent.setVisibility(View.GONE);
tvReceived.setVisibility(View.GONE);
tvStored.setVisibility(View.GONE);
tvSizeEx.setVisibility(View.GONE);
tvLanguage.setVisibility(View.GONE);
@@ -1773,6 +1779,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvReceived.setVisibility(show_addresses ? View.VISIBLE : View.GONE);
tvReceived.setText(DTF.format(message.received));
tvStoredTitle.setVisibility(show_addresses && (debug || BuildConfig.DEBUG) ? View.VISIBLE : View.GONE);
tvStored.setVisibility(show_addresses && (debug || BuildConfig.DEBUG) ? View.VISIBLE : View.GONE);
tvStored.setText(DTF.format(message.stored));
if (!message.duplicate)
tvSizeEx.setAlpha(message.content ? 1.0f : Helper.LOW_LIGHT);
tvSizeExTitle.setVisibility(!show_addresses || message.size == null ? View.GONE : View.VISIBLE);