Show auth+tls as verified

pull/215/head
M66B 6 months ago
parent ce2de433e6
commit 36f9282d8c

@ -1418,8 +1418,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (Boolean.TRUE.equals(message.auth))
auths = 3;
boolean verified = (auths == 3 && (!check_tls || Boolean.TRUE.equals(message.tls)));
if (check_tls && Boolean.TRUE.equals(message.tls))
auths++;
if (!Boolean.TRUE.equals(message.auth) &&
message.dkim == null && message.spf == null && message.dmarc == null)
@ -1427,7 +1427,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
else
ibAuth.setImageLevel(auths + 2);
ibAuth.setImageTintList(ColorStateList.valueOf(
verified ? colorVerified : colorControlNormal));
auths >= 3 ? colorVerified : colorControlNormal));
ibAuth.setVisibility(auths > 0 || (check_tls && !outgoing) ? View.VISIBLE : View.GONE);
} else
ibAuth.setVisibility(View.GONE);

@ -18,4 +18,7 @@
<item
android:drawable="@drawable/twotone_gpp_good_24"
android:maxLevel="5" />
<item
android:drawable="@drawable/twotone_verified_24"
android:maxLevel="6" />
</level-list>

@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M18.49,9.88l0.08,-0.85l0.18,-1.95l-1.9,-0.43l-0.84,-0.19l-0.44,-0.74l-0.99,-1.68L12.79,4.8L12,5.14L11.21,4.8L9.42,4.03L8.43,5.71L7.99,6.45L7.15,6.64l-1.9,0.43l0.18,1.94l0.08,0.85l-0.56,0.65l-1.29,1.48l1.29,1.47l0.56,0.65l-0.08,0.85l-0.18,1.96l1.9,0.43l0.84,0.19l0.44,0.74l0.99,1.67l1.78,-0.77L12,18.85l0.79,0.34l1.78,0.77l0.99,-1.68l0.44,-0.74l0.84,-0.19l1.9,-0.43l-0.18,-1.95l-0.08,-0.85l0.56,-0.65l1.29,-1.47l-1.29,-1.47L18.49,9.88zM10.09,16.72l-3.8,-3.81l1.48,-1.48l2.32,2.33l5.85,-5.87l1.48,1.48L10.09,16.72z"
android:strokeAlpha="0.3"
android:fillAlpha="0.3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M23,11.99l-2.44,-2.79l0.34,-3.69l-3.61,-0.82L15.4,1.5L12,2.96L8.6,1.5L6.71,4.69L3.1,5.5L3.44,9.2L1,11.99l2.44,2.79l-0.34,3.7l3.61,0.82L8.6,22.5l3.4,-1.47l3.4,1.46l1.89,-3.19l3.61,-0.82l-0.34,-3.69L23,11.99zM19.05,13.47l-0.56,0.65l0.08,0.85l0.18,1.95l-1.9,0.43l-0.84,0.19l-0.44,0.74l-0.99,1.68l-1.78,-0.77L12,18.85l-0.79,0.34l-1.78,0.77l-0.99,-1.67l-0.44,-0.74l-0.84,-0.19l-1.9,-0.43l0.18,-1.96l0.08,-0.85l-0.56,-0.65l-1.29,-1.47l1.29,-1.48l0.56,-0.65L5.43,9.01L5.25,7.07l1.9,-0.43l0.84,-0.19l0.44,-0.74l0.99,-1.68l1.78,0.77L12,5.14l0.79,-0.34l1.78,-0.77l0.99,1.68l0.44,0.74l0.84,0.19l1.9,0.43l-0.18,1.95l-0.08,0.85l0.56,0.65l1.29,1.47L19.05,13.47z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M10.09,13.75l-2.32,-2.33l-1.48,1.49l3.8,3.81l7.34,-7.36l-1.48,-1.49z"/>
</vector>

@ -2350,6 +2350,21 @@
app:drawableTint="?attr/colorVerified"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvAuthSome" />
<TextView
android:id="@+id/tvAuthTls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:drawableStart="@drawable/twotone_verified_24"
android:drawablePadding="6dp"
android:text="@string/title_advanced_authentication_tls"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:drawableTint="?attr/colorVerified"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvAuthAll" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -691,6 +691,7 @@
<string name="title_advanced_authentication_none">No authentication</string>
<string name="title_advanced_authentication_some">Partial authentication</string>
<string name="title_advanced_authentication_all">Complete authentication</string>
<string name="title_advanced_authentication_tls" translatable="false">+TLS</string>
<string name="title_advanced_restore_on_launch">Restore app state on start</string>
<string name="title_advanced_sync_on_launch">Synchronize on start</string>

Loading…
Cancel
Save