From 36211fdca04cf77c3ef7e02e4a86b31b36156c9e Mon Sep 17 00:00:00 2001 From: jacques Date: Sun, 3 May 2020 22:45:50 +0200 Subject: [PATCH] Fix test after DetailActivity --- .../net/foucry/pilldroid/MedicamentDetailActivity.java | 1 - .../net/foucry/pilldroid/MedicamentListActivity.java | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) 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)] } }