mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 19:22:14 -05:00
small code restructures
This commit is contained in:
parent
2b0a7f2bf8
commit
312b7fde53
@ -91,28 +91,28 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> {
|
|||||||
TextView status = (TextView) view.findViewById(R.id.status);
|
TextView status = (TextView) view.findViewById(R.id.status);
|
||||||
status.setText("");
|
status.setText("");
|
||||||
|
|
||||||
|
// main user id
|
||||||
String userId = entry.userIds.get(0);
|
String userId = entry.userIds.get(0);
|
||||||
if (userId != null) {
|
if (userId != null) {
|
||||||
String[] userIdSplit = PgpKeyHelper.splitUserId(userId);
|
String[] userIdSplit = PgpKeyHelper.splitUserId(userId);
|
||||||
|
|
||||||
|
// name
|
||||||
if (userIdSplit[0] != null && userIdSplit[0].length() > 0) {
|
if (userIdSplit[0] != null && userIdSplit[0].length() > 0) {
|
||||||
// show red user id if it is a secret key
|
// show red user id if it is a secret key
|
||||||
if (entry.secretKey) {
|
if (entry.secretKey) {
|
||||||
userId = mActivity.getString(R.string.secret_key) + " " + userIdSplit[0];
|
userIdSplit[0] = mActivity.getString(R.string.secret_key) + " " + userIdSplit[0];
|
||||||
mainUserId.setTextColor(Color.RED);
|
mainUserId.setTextColor(Color.RED);
|
||||||
mainUserId.setText(userId);
|
|
||||||
} else {
|
|
||||||
mainUserId.setText(userIdSplit[0]);
|
|
||||||
}
|
}
|
||||||
|
mainUserId.setText(userIdSplit[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// email
|
||||||
if (userIdSplit[1] != null && userIdSplit[1].length() > 0) {
|
if (userIdSplit[1] != null && userIdSplit[1].length() > 0) {
|
||||||
mainUserIdRest.setText(userIdSplit[1]);
|
mainUserIdRest.setText(userIdSplit[1]);
|
||||||
mainUserIdRest.setVisibility(View.VISIBLE);
|
mainUserIdRest.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
mainUserIdRest.setVisibility(View.GONE);
|
mainUserIdRest.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
keyId.setText(entry.hexKeyId);
|
keyId.setText(entry.hexKeyId);
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-18
|
target=android-19
|
||||||
android.library=true
|
android.library=true
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-7
|
target=android-17
|
||||||
android.library=true
|
android.library=true
|
||||||
|
Loading…
Reference in New Issue
Block a user