diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java index 5e46bda6b9..9109cab768 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java @@ -580,14 +580,18 @@ public class MapInfoWidgetsFactory { titleView.setSingleLine(false); } - if (controller.closeBtnVisible && closeButton.getVisibility() == View.GONE) { - closeButton.setVisibility(View.VISIBLE); - } else { + if (controller.closeBtnVisible) { + if (closeButton.getVisibility() == View.GONE) { + closeButton.setVisibility(View.VISIBLE); + } + } else if (closeButton.getVisibility() == View.VISIBLE) { closeButton.setVisibility(View.GONE); } - if (controller.refreshBtnVisible && refreshButton.getVisibility() == View.GONE) { - refreshButton.setVisibility(View.VISIBLE); - } else { + if (controller.refreshBtnVisible) { + if (refreshButton.getVisibility() == View.GONE) { + refreshButton.setVisibility(View.VISIBLE); + } + } else if (refreshButton.getVisibility() == View.VISIBLE) { refreshButton.setVisibility(View.GONE); } }