always show revoked user ids last!

This commit is contained in:
Vincent Breitmoser 2015-01-19 17:29:33 +01:00
parent 3752cdd132
commit e71bd3d9dd

View File

@ -716,6 +716,10 @@ public class ProviderHelper {
@Override
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.
// we compare for null values here, so != is the correct operator!
// noinspection NumberEquality
@ -726,10 +730,6 @@ public class ProviderHelper {
if (isPrimary != o.isPrimary) {
return isPrimary ? -1 : 1;
}
// revoked keys always come last!
if (isRevoked != o.isRevoked) {
return isRevoked ? 1 : -1;
}
return 0;
}
}