ImportKeys: Add ability to "Show key" instead of "Import" for already imported keys

This commit is contained in:
Andrea Torlaschi
2016-08-24 11:42:06 +02:00
parent 48266fd8e0
commit 702888bbe4
6 changed files with 71 additions and 16 deletions

View File

@@ -7,7 +7,6 @@
<variable name="nonInteractive" type="boolean" />
<variable name="entry" type="ImportKeysListEntry" />
<variable name="expanded" type="boolean" />
</data>
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"

View File

@@ -2,6 +2,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View" alias="V" />
<import type="org.sufficientlysecure.keychain.keyimport.ImportKeysListEntry" />
<variable name="entry" type="ImportKeysListEntry" />
@@ -98,7 +99,14 @@
<Button
android:id="@+id/import_key"
style="@style/CardViewActionButton"
android:text="@string/btn_import" />
android:text="@string/btn_import"
android:visibility="@{entry.updated ? V.GONE : V.VISIBLE}" />
<Button
android:id="@+id/show_key"
style="@style/CardViewActionButton"
android:text="@string/btn_show_key"
android:visibility="@{entry.updated ? V.VISIBLE : V.GONE}" />
</LinearLayout>