mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 19:22:14 -05:00
Show revoked and expired for private keys
This commit is contained in:
parent
3451111edd
commit
55b764eb1d
@ -475,13 +475,7 @@ public class KeyListFragment extends LoaderFragment
|
||||
}
|
||||
}
|
||||
|
||||
{ // set edit button and revoked info, specific by key type
|
||||
|
||||
if (cursor.getInt(KeyListFragment.INDEX_HAS_ANY_SECRET) != 0) {
|
||||
// this is a secret key
|
||||
h.mStatus.setVisibility(View.GONE);
|
||||
} else {
|
||||
// this is a public key - show if it's revoked, expired, or verified
|
||||
{ // set edit button and status, specific by key type
|
||||
|
||||
boolean isRevoked = cursor.getInt(INDEX_IS_REVOKED) > 0;
|
||||
boolean isExpired = !cursor.isNull(INDEX_EXPIRY)
|
||||
@ -502,16 +496,21 @@ public class KeyListFragment extends LoaderFragment
|
||||
PorterDuff.Mode.SRC_ATOP);
|
||||
h.mStatus.setVisibility(View.VISIBLE);
|
||||
} else if (isVerified) {
|
||||
if (cursor.getInt(KeyListFragment.INDEX_HAS_ANY_SECRET) != 0) {
|
||||
// this is a secret key
|
||||
h.mStatus.setVisibility(View.GONE);
|
||||
} else {
|
||||
// this is a public key - show if it's verified
|
||||
h.mStatus.setImageDrawable(
|
||||
getResources().getDrawable(R.drawable.status_signature_verified_cutout));
|
||||
h.mStatus.setColorFilter(getResources().getColor(R.color.android_green_light),
|
||||
PorterDuff.Mode.SRC_ATOP);
|
||||
h.mStatus.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
h.mStatus.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user