Move a line of code

This commit is contained in:
Alexander Sytnyk 2017-11-07 10:43:04 +02:00
parent a2cb399f57
commit 8d3c86aaec

View file

@ -30,10 +30,10 @@ public class BaseOsmAndFragment extends Fragment {
Activity activity = getActivity(); Activity activity = getActivity();
int colorId = getStatusBarColorId(); int colorId = getStatusBarColorId();
if (colorId != -1) { if (colorId != -1) {
statusBarColor = activity.getWindow().getStatusBarColor();
if (activity instanceof MapActivity) { if (activity instanceof MapActivity) {
((MapActivity) activity).updateStatusBarColor(); ((MapActivity) activity).updateStatusBarColor();
} else { } else {
statusBarColor = activity.getWindow().getStatusBarColor();
activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, colorId)); activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, colorId));
} }
} }