Clean code, remove unused methods, comments

This commit is contained in:
jacques 2022-08-01 08:01:11 +02:00
parent b3079837d3
commit 9fce7a2e8a
3 changed files with 0 additions and 24 deletions

View file

@ -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);
}

View file

@ -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);

View file

@ -60,14 +60,4 @@ public class Utils {
});
}
public static void rearrangePrescriptionList(List<Prescription> 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);
}
}
}
}