src/main/java/seedu/address/ui/MainWindow.java
/**
     * Updates the date label when a day is deleted.
     *
     * @param indexOfDayDeleted the index (zeroBased) of the day that is deleted.
     */
Updates the date label when a day is deleted.
@param indexOfDayDeleted the index (zeroBased) of the day that is deleted.
Updates the date label when a day is deleted . @param indexOfDayDeleted the index ( zeroBased ) of the day that is deleted .
void updateDateLabelWhenDelete(int indexOfDayDeleted) {
        boolean isCurrDayShowingDeleted = indexOfDayDeleted == indexOfDayCurrentlyShowingCalories;
        if (isCurrDayShowingDeleted) {
            boolean isLastDayBeingDeleted = indexOfDayDeleted == logic.getFilteredDayList().size();
            if (isLastDayBeingDeleted) {
                clearDateLabel();
            } else {
                String dateStringOfNextDay = logic.getFilteredDayList().get(indexOfDayDeleted)
                        .getDate().get().toString();
                setDateLabel(dateStringOfNextDay);
            }
        }
    }
void updateDateLabelWhenDelete ( int indexOfDayDeleted ) { boolean isCurrDayShowingDeleted = indexOfDayDeleted == indexOfDayCurrentlyShowingCalories ; if ( isCurrDayShowingDeleted ) { boolean isLastDayBeingDeleted = indexOfDayDeleted == logic . getFilteredDayList ( ) . size ( ) ; if ( isLastDayBeingDeleted ) { clearDateLabel ( ) ; } else { String dateStringOfNextDay = logic . getFilteredDayList ( ) . get ( indexOfDayDeleted ) . getDate ( ) . get ( ) . toString ( ) ; setDateLabel ( dateStringOfNextDay ) ; } } }
Updates the date label when a day is deleted.
Updates the date label when a day is deleted .