small refactoring

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

View file

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