From 4e6dea24c8986396a916fab5c4cb1c1fdb85d2ff Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Mon, 1 Jan 2018 21:52:56 +0100 Subject: [PATCH] Fix a bug where manually entered profiles were added to the view twice --- app/src/main/java/me/impy/aegis/MainActivity.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/src/main/java/me/impy/aegis/MainActivity.java b/app/src/main/java/me/impy/aegis/MainActivity.java index 8bdd761d..db53584b 100644 --- a/app/src/main/java/me/impy/aegis/MainActivity.java +++ b/app/src/main/java/me/impy/aegis/MainActivity.java @@ -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(); } }