Add check for fragments over map

This commit is contained in:
Vitaliy 2020-08-05 14:18:50 +03:00
parent a60a85d156
commit 5b4420eb42

View file

@ -1120,7 +1120,13 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
} }
public boolean isMapVisible() { public boolean isMapVisible() {
return AndroidUtils.isActivityNotDestroyed(this) && settings.MAP_ACTIVITY_ENABLED.get(); for (Fragment fragment : getSupportFragmentManager().getFragments()) {
if (fragment.isVisible()) {
return false;
}
}
return AndroidUtils.isActivityNotDestroyed(this) && settings.MAP_ACTIVITY_ENABLED.get()
&& !dashboardOnMap.isVisible();
} }
private void restartApp() { private void restartApp() {