ImportKeys: Integrate more features in ImportKeysListEntry
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
<variable name="highlighter" type="Highlighter" />
|
||||
|
||||
<variable name="entry" type="ImportKeysListEntry" />
|
||||
<variable name="userId" type="String" />
|
||||
<variable name="userIdEmail" type="String" />
|
||||
</data>
|
||||
|
||||
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
@@ -61,23 +59,23 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{entry.secretKey ? @string/secret_key + " " + (userId ?? @string/user_id_no_name) : highlighter.highlight(userId ?? @string/user_id_no_name)}'
|
||||
android:text='@{entry.secretKey ? @string/secret_key + " " + (entry.primaryUserId.name ?? @string/user_id_no_name) : highlighter.highlight(entry.primaryUserId.name ?? @string/user_id_no_name)}'
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@{entry.revoked || entry.expired ? revokedExpiredColor : (entry.secretKey ? secretColor : standardColor)}" />
|
||||
android:textColor="@{entry.revokedOrExpired ? revokedExpiredColor : (entry.secretKey ? secretColor : standardColor)}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@{highlighter.highlight(userIdEmail)}"
|
||||
android:text="@{highlighter.highlight(entry.primaryUserId.email)}"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@{entry.revoked || entry.expired ? revokedExpiredColor : standardColor}" />
|
||||
android:textColor="@{entry.revokedOrExpired ? revokedExpiredColor : standardColor}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@{entry.revoked || entry.expired ? revokedExpiredColor : standardColor}"
|
||||
android:textColor="@{entry.revokedOrExpired ? revokedExpiredColor : standardColor}"
|
||||
app:keyId='@{entry.keyIdHex ?? ""}' />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -88,7 +86,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="@{entry.revoked || entry.expired ? View.VISIBLE : View.GONE}" />
|
||||
android:visibility="@{entry.revokedOrExpired ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user