mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Conditionally show message stored time
This commit is contained in:
parent
12e530f4fc
commit
a2a0f22687
3 changed files with 39 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -373,6 +373,31 @@
|
|||
app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSent" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvStoredTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:labelFor="@+id/tvStored"
|
||||
android:text="@string/title_stored"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReceived" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvStored"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="12:34:56"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReceived" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvSizeExTitle"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -383,7 +408,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReceived" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvStored" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvSizeEx"
|
||||
|
@ -396,7 +421,7 @@
|
|||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/barrier_addresses"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvReceived" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvStored" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvLanguageTitle"
|
||||
|
@ -433,7 +458,7 @@
|
|||
tvFromExTitle,tvToTitle,tvReplyToTitle,
|
||||
tvCcTitle,tvBccTitle,
|
||||
tvIdentityTitle,
|
||||
tvSentTitle,tvReceivedTitle,
|
||||
tvSentTitle,tvReceivedTitle,tvStoredTitle,
|
||||
tvSizeExTitle, tvLanguageTitle" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
|
|
|
@ -933,6 +933,7 @@
|
|||
<string name="title_via_identity">Via:</string>
|
||||
<string name="title_sent">Sent:</string>
|
||||
<string name="title_received">Received:</string>
|
||||
<string name="title_stored">Stored:</string>
|
||||
<string name="title_size">Size:</string>
|
||||
<string name="title_language">Language:</string>
|
||||
<string name="title_subject">Subject:</string>
|
||||
|
|
Loading…
Reference in a new issue