aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-03-15 16:32:52 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2015-03-15 16:32:52 +0100
commit81d6da899f6662b4f14f50ed8797fb219bf0ae57 (patch)
tree436163d9b4ae17ab685f3e747ddda0b8eb4ade3a /OpenKeychain/src/main/java/org
parente873bac8803c0cf4f086d278a3ed1fd847cfb425 (diff)
downloadopen-keychain-81d6da899f6662b4f14f50ed8797fb219bf0ae57.tar.gz
open-keychain-81d6da899f6662b4f14f50ed8797fb219bf0ae57.tar.bz2
open-keychain-81d6da899f6662b4f14f50ed8797fb219bf0ae57.zip
Show main user id instead of key in certify screen
Diffstat (limited to 'OpenKeychain/src/main/java/org')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java25
1 files changed, 15 insertions, 10 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java
index 015775669..5a0782e54 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java
@@ -81,16 +81,6 @@ public class MultiUserIdsAdapter extends CursorAdapter {
ArrayList<String> uids = p.createStringArrayList();
p.recycle();
- if (isHeader == 1) {
- long masterKeyId = cursor.getLong(0);
- vHeaderId.setVisibility(View.VISIBLE);
- String message = mContext.getString(R.string.section_uids_to_certify) +
- KeyFormattingUtils.beautifyKeyIdWithPrefix(mContext, masterKeyId);
- vHeaderId.setText(message);
- } else {
- vHeaderId.setVisibility(View.GONE);
- }
-
{ // first one
String userId = uids.get(0);
String[] splitUserId = KeyRing.splitUserId(userId);
@@ -99,6 +89,21 @@ public class MultiUserIdsAdapter extends CursorAdapter {
} else {
vName.setText(R.string.user_id_no_name);
}
+
+ if (isHeader == 1) {
+ vHeaderId.setVisibility(View.VISIBLE);
+ String message;
+ if (splitUserId[0] != null) {
+ message = mContext.getString(R.string.section_uids_to_certify) +
+ splitUserId[0];
+ } else {
+ message = mContext.getString(R.string.section_uids_to_certify) +
+ context.getString(R.string.user_id_no_name);
+ }
+ vHeaderId.setText(message);
+ } else {
+ vHeaderId.setVisibility(View.GONE);
+ }
}
StringBuilder lines = new StringBuilder();