change how empty private cheks happen, speeds things up

This commit is contained in:
Ash Hughes
2013-03-18 16:07:34 +00:00
parent 2ccd3796c4
commit 12d6cfefd7
3 changed files with 12 additions and 11 deletions

View File

@@ -159,13 +159,8 @@ public class KeyListAdapter extends CursorTreeAdapter {
}
ImageView signIcon = (ImageView) view.findViewById(R.id.ic_signKey);
boolean privateEmpty = false; //Don't show signing icon for master keys without private keys
//TODO: does this need to be done for encrypting icon? Does anyone use master key for encrypt?
if (cursor.getInt(cursor.getColumnIndex(Keys.IS_MASTER_KEY)) == 1) {
privateEmpty = PgpHelper.isSecretKeyPrivateEmpty(context,
cursor.getLong(cursor.getColumnIndex(Keys.KEY_ID)));
}
if (privateEmpty || cursor.getInt(cursor.getColumnIndex(Keys.CAN_SIGN)) != 1) {
if (cursor.getInt(cursor.getColumnIndex(Keys.CAN_SIGN)) != 1) {
signIcon.setVisibility(View.GONE);
} else {
signIcon.setVisibility(View.VISIBLE);