mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-21 20:19:23 +01:00
Clean code, remove unused methods, comments
This commit is contained in:
parent
b3079837d3
commit
9fce7a2e8a
3 changed files with 0 additions and 24 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue