diff --git a/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java b/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java index 40dc4bb..b1db584 100644 --- a/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/MedicamentDetailActivity.java @@ -56,7 +56,6 @@ public class MedicamentDetailActivity extends AppCompatActivity { getMedicamentChanges(); setResult(1); - finish(); } }); diff --git a/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java b/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java index a60f0dc..2baa9a7 100644 --- a/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java @@ -320,11 +320,10 @@ public class MedicamentListActivity extends AppCompatActivity { // Handle cancel Toast.makeText(context, "Scan annulé", Toast.LENGTH_LONG).show(); } - else { - Toast.makeText(context, "back from detail", Toast.LENGTH_SHORT).show(); - // TODO : Si requestCode=1 -> Sauvegarde du medoc dans la base et - // TODO : raffraichissement de la base.[Call updateDrug(medicament)] - } + } else if (requestCode == 1){ + Toast.makeText(context, "back from detail", Toast.LENGTH_SHORT).show(); + // TODO : Si requestCode=1 -> Sauvegarde du medoc dans la base et + // TODO : raffraichissement de la base.[Call updateDrug(medicament)] } }