diff options
Diffstat (limited to 'OpenKeychain')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java index 08a0c524b..6c81e9193 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java @@ -147,13 +147,10 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> { if (entry.isSecretKey()) { holder.mainUserId.setText(mActivity.getString(R.string.secret_key) + " " + userIdSplit[0]); - holder.mainUserId.setTextColor(Color.RED); } else { holder.mainUserId.setText(highlighter.highlight(userIdSplit[0])); - holder.mainUserId.setTextColor(Color.BLACK); } } else { - holder.mainUserId.setTextColor(Color.BLACK); holder.mainUserId.setText(R.string.user_id_no_name); } @@ -196,9 +193,14 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> { holder.status.setVisibility(View.GONE); holder.algorithm.setVisibility(View.VISIBLE); - holder.mainUserId.setTextColor(getContext().getResources().getColor(R.color.black)); - holder.mainUserIdRest.setTextColor(getContext().getResources().getColor(R.color.black)); - holder.keyId.setTextColor(getContext().getResources().getColor(R.color.black)); + if (entry.isSecretKey()) { + holder.mainUserId.setTextColor(Color.RED); + } else { + holder.mainUserId.setTextColor(Color.BLACK); + } + + holder.mainUserIdRest.setTextColor(Color.BLACK); + holder.keyId.setTextColor(Color.BLACK); } if (entry.getUserIds().size() == 1) { |