From 3f4c86742136dd8c539a4cca1a9012855f5dd1fb Mon Sep 17 00:00:00 2001 From: jacques Date: Tue, 22 Sep 2020 11:04:58 +0200 Subject: [PATCH] fix double record; add/change comments. --- .../net/foucry/pilldroid/MedicamentListActivity.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java b/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java index d269bca..881abdc 100644 --- a/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/MedicamentListActivity.java @@ -369,7 +369,6 @@ public class MedicamentListActivity extends AppCompatActivity { { med.setDateEndOfStock(); mAdapter.addItem(med); - dbHelper.addDrug(med); } /** @@ -409,6 +408,10 @@ public class MedicamentListActivity extends AppCompatActivity { } } + /** + * cancelJob in PillDroidJobService + * @param v Riew + */ public void cancelJob(View v) { JobScheduler scheduler = (JobScheduler) getSystemService(JOB_SCHEDULER_SERVICE); scheduler.cancel(24560); @@ -416,8 +419,8 @@ public class MedicamentListActivity extends AppCompatActivity { } /** - * - * @param recyclerView + * setupRecyclerView (list of medicaments + * @param recyclerView RecyclerView */ private void setupRecyclerView(@NonNull RecyclerView recyclerView) { recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getApplicationContext())); @@ -425,7 +428,7 @@ public class MedicamentListActivity extends AppCompatActivity { recyclerView.setAdapter(mAdapter); } - // TDOO: remove in release + // TODO: remove in release private String getAppName() { PackageManager packageManager = getApplicationContext().getPackageManager(); ApplicationInfo applicationInfo = null;