refactor: simplified dayCellFactory for date selector

Instead of generating a list of dates for every single visible date and checking if it is contained in that list, we now use a (admittedly scary-looking) predicate to compare the date to the start and enddates
This commit is contained in:
David Guler
2022-11-15 15:25:51 +01:00
parent 05e7bcc2e8
commit 90d2de65de
4 changed files with 62 additions and 63 deletions
@@ -108,7 +108,7 @@ public class MyGardenController {
stage.initModality(Modality.APPLICATION_MODAL);
stage.setResizable(true);
stage.showAndWait();
} catch (IOException | HardinessZoneNotSetException | PlantNotFoundException e) {
} catch (IOException | PlantNotFoundException e) {
// TODO: show error alert
LOG.log(Level.SEVERE, "Could not load plant details.", e);
}