Show SMTP max message size

This commit is contained in:
M66B 2020-07-02 08:00:49 +02:00
parent b39ed003b6
commit a9930e020c
2 changed files with 17 additions and 5 deletions

View File

@ -79,6 +79,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
private TextView tvAccount;
private TextView tvSignKeyId;
private TextView tvLast;
private TextView tvMaxSize;
private TextView tvError;
private TwoStateOwner powner = new TwoStateOwner(owner, "IdentityPopup");
@ -99,6 +100,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
tvAccount = itemView.findViewById(R.id.tvAccount);
tvSignKeyId = itemView.findViewById(R.id.tvSignKeyId);
tvLast = itemView.findViewById(R.id.tvLast);
tvMaxSize = itemView.findViewById(R.id.tvMaxSize);
tvError = itemView.findViewById(R.id.tvError);
}
@ -158,7 +160,10 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
tvSignKeyId.setVisibility(sb.length() > 0 ? View.VISIBLE : View.GONE);
tvLast.setText(context.getString(R.string.title_last_connected,
identity.last_connected == null ? "-" : DTF.format(identity.last_connected)));
(identity.last_connected == null ? "-" : DTF.format(identity.last_connected))));
tvMaxSize.setText(identity.max_size == null ? null : Helper.humanReadableByteCount(identity.max_size, true));
tvMaxSize.setVisibility(identity.max_size == null ? View.GONE : View.VISIBLE);
tvError.setText(identity.error);
tvError.setVisibility(identity.error == null ? View.GONE : View.VISIBLE);

View File

@ -136,13 +136,10 @@
android:id="@+id/tvAccount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:text="account"
android:textAlignment="textEnd"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tvHost"
app:layout_constraintTop_toTopOf="@id/tvHost" />
<eu.faircode.email.FixedTextView
@ -167,10 +164,20 @@
android:singleLine="true"
android:text="Last connected time"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@+id/tvMaxSize"
app:layout_constraintStart_toEndOf="@+id/ivState"
app:layout_constraintTop_toBottomOf="@id/tvSignKeyId" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvMaxSize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="6dp"
android:text="10 MB"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tvLast" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvError"
android:layout_width="0dp"