fix double record;

add/change comments.
This commit is contained in:
jacques 2020-09-22 11:04:58 +02:00
parent 3a62ead474
commit 3f4c867421

View file

@ -369,7 +369,6 @@ public class MedicamentListActivity extends AppCompatActivity {
{ {
med.setDateEndOfStock(); med.setDateEndOfStock();
mAdapter.addItem(med); 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) { public void cancelJob(View v) {
JobScheduler scheduler = (JobScheduler) getSystemService(JOB_SCHEDULER_SERVICE); JobScheduler scheduler = (JobScheduler) getSystemService(JOB_SCHEDULER_SERVICE);
scheduler.cancel(24560); scheduler.cancel(24560);
@ -416,8 +419,8 @@ public class MedicamentListActivity extends AppCompatActivity {
} }
/** /**
* * setupRecyclerView (list of medicaments
* @param recyclerView * @param recyclerView RecyclerView
*/ */
private void setupRecyclerView(@NonNull RecyclerView recyclerView) { private void setupRecyclerView(@NonNull RecyclerView recyclerView) {
recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getApplicationContext())); recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getApplicationContext()));
@ -425,7 +428,7 @@ public class MedicamentListActivity extends AppCompatActivity {
recyclerView.setAdapter(mAdapter); recyclerView.setAdapter(mAdapter);
} }
// TDOO: remove in release // TODO: remove in release
private String getAppName() { private String getAppName() {
PackageManager packageManager = getApplicationContext().getPackageManager(); PackageManager packageManager = getApplicationContext().getPackageManager();
ApplicationInfo applicationInfo = null; ApplicationInfo applicationInfo = null;