small refactoring

This commit is contained in:
nazar-kutz 2020-12-15 14:22:24 +02:00
parent da6273d126
commit 8ff06d88c9

View file

@ -545,9 +545,11 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
public void onClick(View view) { public void onClick(View view) {
dismiss(); dismiss();
Fragment fragment = getTargetFragment(); if (dialogMode == DialogMode.PLAN_ROUTE) {
if (fragment instanceof MeasurementToolFragment) { Fragment fragment = getTargetFragment();
((MeasurementToolFragment) fragment).getOnBackPressedCallback().setEnabled(false); if (fragment instanceof MeasurementToolFragment) {
((MeasurementToolFragment) fragment).getOnBackPressedCallback().setEnabled(false);
}
} }
Bundle args = new Bundle(); Bundle args = new Bundle();