@@ -660,7 +660,7 @@ private void onFollowUpUntilChanged(Property.ValueChangeEvent valueChangeEvent,
660660 ContactDto originalContact = getInternalValue ();
661661 Date oldFollowUpUntil = originalContact .getFollowUpUntil ();
662662 Date oldQuarantineEnd = originalContact .getQuarantineTo ();
663- if (adjustQuarantine (quarantineTo , newFollowUpUntil , oldFollowUpUntil )) {
663+ if (shouldAdjustQuarantine (quarantineTo , newFollowUpUntil , oldFollowUpUntil )) {
664664 VaadinUiUtil .showConfirmationPopup (
665665 I18nProperties .getString (Strings .headingAdjustQuarantine ),
666666 new Label (I18nProperties .getString (Strings .confirmationAlsoAdjustQuarantine )),
@@ -672,7 +672,7 @@ private void onFollowUpUntilChanged(Property.ValueChangeEvent valueChangeEvent,
672672 quarantineChangedByFollowUpUntilChange = true ;
673673 quarantineTo .setValue (newFollowUpUntil );
674674 if (oldQuarantineEnd != null ) {
675- boolean quarantineExtended = newFollowUpUntil .after (oldQuarantineEnd );
675+ boolean quarantineExtended = quarantineTo . getValue () .after (oldQuarantineEnd );
676676 quarantineExtendedCheckBox .setValue (quarantineExtended );
677677 quarantineReducedCheckBox .setValue (!quarantineExtended );
678678 setVisible (quarantineExtended , ContactDto .QUARANTINE_EXTENDED );
@@ -683,7 +683,7 @@ private void onFollowUpUntilChanged(Property.ValueChangeEvent valueChangeEvent,
683683 }
684684 }
685685
686- private boolean adjustQuarantine (DateField quarantineTo , Date newFollowUpUntil , Date oldFollowUpUntil ) {
686+ private boolean shouldAdjustQuarantine (DateField quarantineTo , Date newFollowUpUntil , Date oldFollowUpUntil ) {
687687 return newFollowUpUntil != null &&
688688 (oldFollowUpUntil == null || newFollowUpUntil .after (oldFollowUpUntil )) &&
689689 quarantineTo .getValue () != null && newFollowUpUntil .compareTo (quarantineTo .getValue ()) != 0 ;
0 commit comments