diff options
Diffstat (limited to 'OpenKeychain/src/main/java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java | 25 |
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(); |