Fix coordinates widget visibility for route info menu

This commit is contained in:
Chumva 2019-05-16 10:38:05 +03:00
parent 377d15b177
commit f9bf59121c
2 changed files with 9 additions and 1 deletions

View file

@ -1820,6 +1820,14 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
return directionInfo;
}
public boolean shouldShowTopControls() {
return shouldShowTopControls(isVisible());
}
public boolean shouldShowTopControls(boolean menuVisible) {
return !menuVisible || !portraitMode || getCurrentMenuState() == MenuState.HEADER_ONLY;
}
public boolean isVisible() {
WeakReference<MapRouteInfoMenuFragment> fragmentRef = findMenuFragment();
if (fragmentRef != null) {

View file

@ -1067,7 +1067,7 @@ public class MapInfoWidgetsFactory {
@SuppressLint("SetTextI18n")
public boolean updateInfo() {
boolean visible = settings.SHOW_COORDINATES_WIDGET.get() && map.getContextMenu().shouldShowTopControls()
&& !map.getMapRouteInfoMenu().isVisible() && !map.isTopToolbarActive()
&& map.getMapRouteInfoMenu().shouldShowTopControls() && !map.isTopToolbarActive()
&& !MapRouteInfoMenu.chooseRoutesVisible && !MapRouteInfoMenu.waypointsVisible;
updateVisibility(visible);