mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 19:22:14 -05:00
always show revoked user ids last!
This commit is contained in:
parent
3752cdd132
commit
e71bd3d9dd
@ -716,6 +716,10 @@ public class ProviderHelper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(UserPacketItem o) {
|
public int compareTo(UserPacketItem o) {
|
||||||
|
// revoked keys always come last!
|
||||||
|
if (isRevoked != o.isRevoked) {
|
||||||
|
return isRevoked ? 1 : -1;
|
||||||
|
}
|
||||||
// if one is a user id, but the other isn't, the user id always comes first.
|
// if one is a user id, but the other isn't, the user id always comes first.
|
||||||
// we compare for null values here, so != is the correct operator!
|
// we compare for null values here, so != is the correct operator!
|
||||||
// noinspection NumberEquality
|
// noinspection NumberEquality
|
||||||
@ -726,10 +730,6 @@ public class ProviderHelper {
|
|||||||
if (isPrimary != o.isPrimary) {
|
if (isPrimary != o.isPrimary) {
|
||||||
return isPrimary ? -1 : 1;
|
return isPrimary ? -1 : 1;
|
||||||
}
|
}
|
||||||
// revoked keys always come last!
|
|
||||||
if (isRevoked != o.isRevoked) {
|
|
||||||
return isRevoked ? 1 : -1;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user