diff --git a/app/src/main/java/net/foucry/pilldroid/AlarmReceiver.java b/app/src/main/java/net/foucry/pilldroid/AlarmReceiver.java index 002dc35..7555267 100644 --- a/app/src/main/java/net/foucry/pilldroid/AlarmReceiver.java +++ b/app/src/main/java/net/foucry/pilldroid/AlarmReceiver.java @@ -61,7 +61,6 @@ public class AlarmReceiver extends BroadcastReceiver { // Sorting list by dateEndOfStock prescriptionList = prescriptionsDAO.getAllMedics(); // Reread the database Utils.sortPrescriptionList(prescriptionList); - //Utils.rearrangePrescriptionList(prescriptionList); try { firstPrescription = prescriptionList.get(0); } diff --git a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java index 363a9be..049fc81 100644 --- a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java @@ -283,22 +283,9 @@ public class DrugListActivity extends AppCompatActivity { PrescriptionsDAO prescriptionsDAO = prescriptions.getPrescriptionsDAO(); prescriptionList = prescriptionsDAO.getAllMedics(); - //Prescription currentPrescription; - // Sorting list by dateEndOfStock Utils.sortPrescriptionList(prescriptionList); - // Move Prescription with take==0 to the end of the list - //Utils.rearrangePrescriptionList(prescriptionList); - /*for (int i=0 ; i < prescriptionList.size(); i++ ){ - currentPrescription = prescriptionList.get(i); - //currentPrescription.newStock(); - if (currentPrescription.getTake() == 0) { - prescriptionList.remove(currentPrescription); - prescriptionList.add(prescriptionList.size(), currentPrescription); - } - }*/ - View mRecyclerView = findViewById(R.id.drug_list); assert mRecyclerView != null; setupRecyclerView((RecyclerView) mRecyclerView); diff --git a/app/src/main/java/net/foucry/pilldroid/Utils.java b/app/src/main/java/net/foucry/pilldroid/Utils.java index dc942a6..b5b65ff 100644 --- a/app/src/main/java/net/foucry/pilldroid/Utils.java +++ b/app/src/main/java/net/foucry/pilldroid/Utils.java @@ -60,14 +60,4 @@ public class Utils { }); } - public static void rearrangePrescriptionList(List prescriptionList) { - Prescription currentPrescription = null; - for (int i=0 ; i < prescriptionList.size(); i++ ){ - currentPrescription = prescriptionList.get(i); - if (currentPrescription.getTake() == 0) { - prescriptionList.remove(currentPrescription); - prescriptionList.add(prescriptionList.size(), currentPrescription); - } - } - } }