Fix a bug where manually entered profiles were added to the view twice

pull/41/head
Alexander Bakker 7 years ago
parent 22861548c9
commit 4e6dea24c8

@ -376,14 +376,7 @@ public class MainActivity extends AegisActivity implements KeyProfileView.Listen
private void onEnterKeyInfoResult(int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
KeyProfile profile = (KeyProfile) data.getSerializableExtra("KeyProfile");
try {
addKey(profile);
} catch (Exception e) {
e.printStackTrace();
Toast.makeText(this, "An error occurred while trying to add an entry", Toast.LENGTH_SHORT).show();
return;
}
_keyProfileView.addKey(profile);
addKey(profile);
saveDatabase();
}
}

Loading…
Cancel
Save