Adopt #23 shouldDismiss delegate method.