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

This commit is contained in:
Alexander Bakker 2018-01-01 21:52:56 +01:00
parent 22861548c9
commit 4e6dea24c8

View file

@ -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);
saveDatabase();
}
}