Skip to content

Commit

Permalink
Sprint2: Fix Home-Log-Visulization before input vacation bug (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianrui-qi authored Oct 25, 2024
1 parent 736129c commit 3d9498e
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ private void buttonVisualization() {

pieChart.animateY(1000, Easing.EaseInOutQuad);

mainViewModel.getVacation(
vacationData -> mainViewModel.calVacation(
arrangedDaysStr -> updateVisualization(
Integer.parseInt(arrangedDaysStr),
Integer.parseInt(Objects.requireNonNull(vacationData.get("duration")))
)
)
);
mainViewModel.getVacation(vacationData -> {
if (vacationData != null) {
mainViewModel.calVacation(arrangedDaysStr -> updateVisualization(
Integer.parseInt(arrangedDaysStr),
Integer.parseInt(Objects.requireNonNull(vacationData.get("duration")))
));
}
});
}

private void updateVisualization(int arrangedDays, int totalDays) {
Expand Down

0 comments on commit 3d9498e

Please sign in to comment.